0

I am trying to add latitude and longitude to my search function. However, when I try to add fulltext in phpmyadmin, I receive the following error:

#1283 - Column 'latitude' cannot be part of FULLTEXT index

Any thoughts on how to address this would be immensely appreciated!

UPDATE: Fixed error by changing latitude and longitude to varchar. However, still nothing happens on my map when I make a selection from the map search drop-down. Any thoughts?

1

Fulltext index is only supported on columns that are either of type varchar, text, or char, and some others you likely won't use. latitude and longitude are both of type decimal.

See this page, quote below.

Only columns of type char, varchar, nchar, nvarchar, text, ntext, image, xml, and varbinary(max) can be indexed for full-text search.

Edit: I saw your update; while changing the types of the latitude and longitude columns will allow you to index them as fulltext, it is generally a bad idea to change things already written when a hundred things might critically depend on them. If something suddenly doesn't work after you did alter something, you likely broke it.

Did your search bar work prior to you indexing latitude and longitude as fulltext?

3
  • Thanks! No I am having trouble with my search bar and (incorrectly) thought the latitude/longitude issue was the missing piece. My code for add markers works, but I am unsure why I am unable to update my map when I make a selection from the search bar. – chsher Oct 25 '16 at 16:25
  • All set, thanks! I realized now that I did not need to add latitude and longitude to the FULLTEXT -- just needed to include them in my places array. – chsher Oct 25 '16 at 16:34
  • Glad you figured it out :) I really had no idea why your map didn't re-center as that code was already written. – kluvin Oct 25 '16 at 16:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .