Question on full text search and filter on geolocation

Showing 1-3 of 3 messages
Question on full text search and filter on geolocation Nicolas 3/27/13 3:39 AM
Hello !

I have been using MongoDB for a few months now, and I have installed the last released version to make some tests on full text search.
I find it very great, the search is very effective and response times are great.

I only have two questions:

- Is there a plan for an integration of the text search to be able to run it using find instead of runCommand?
- I tried to combine FTS with a search for documents within a circle area (query below), but whatever the criteria on the location are, the results remain the same. Isn'it possible to mix FTS and geosearch? If it is, could you help me finding what I am doing wrong?

The query used:
db.generated.runCommand("text", { search: "bike", filter: { "location.coordinates": { $near: [40, 7.25], $maxDistance: 0.01 }}})

Thanks in advance !

Nicolas
Re: Question on full text search and filter on geolocation Randall Hunt 3/27/13 10:51 AM
Greetings Nicolas,

We're very pleased that you're enjoying your experience with mongodb so far!

There is a plan for integration of text search into the regular query structure. As the feature is in beta right now there is no hard timeline on when that will be done.

Unfortunately you cannot currently use $near queries as part of the filter. As an alternative you might consider using a $geoWithin query?

db.generated.runCommand("text", {search: "bike", filter:{"location.coordinates": {$geoWithin: {$center: [[40,7.25], .01]}}}})

Hope this helps,

Randall
Re: Question on full text search and filter on geolocation Nicolas 3/28/13 1:07 AM
Hello Randall

I am glad to know that the text search will be integrated in the query structure.
For my second point, the $geoWithin perfectly fits my needs, and I can still sort the results by myself if I really needed to do so.

Thanks a lot, this was really helpful !

Nicolas

Le mercredi 27 mars 2013 18:51:00 UTC+1, Randall Hunt a écrit :