FWIW I helped someone a few days ago about a similar problem and similarly 
advised modifying SpatialPrefixTree:
http://lucene.472066.n3.nabble.com/PointType-multivalued-query-tt4020445.html

IMO GeoHashField should be deprecated because it ads no value.

~ David

On Nov 16, 2012, at 1:49 PM, Scott Smith wrote:

> Thanks for the suggestions.  I'll take a look at these things.
> 
> -----Original Message-----
> From: Mikhail Khludnev [mailto:mkhlud...@griddynamics.com] 
> Sent: Thursday, November 15, 2012 11:54 PM
> To: solr-user@lucene.apache.org
> Subject: Re: Custom Solr indexer/searcher
> 
> Scott,
> It sounds like you need to look into few samples of similar things in Lucene. 
> On top of my head FuzzyQuery from 4.0, which finds terms similar to the given 
> in FST for query expansion. Generic query expansion is done via 
> MultiTermQuery. Index time terms expansion is shown in TrieField and btw 
> NumericRangeQuery (it should match with your goal a lot). All these are 
> single dimension samples, but AFAIK KD-tree is multidimensional, look into 
> GeoHashField which puts two dimensional points into single terms with ability 
> to build ranges on them see GeoHashField.createSpatialQuery().
> 
> Happy hacking!
> 
> 
> On Fri, Nov 16, 2012 at 10:34 AM, John Whelan <whelanl...@gmail.com> wrote:
> 
>> Scott,
>> 
>> I probably have no idea as to what I'm saying, but if you're looking 
>> for finding results in a N-dimensional space, you might look at 
>> creating a field of type 'point'. Point-type fields have a dimension 
>> attribute; I believe that it can be set to a large integer value.
>> 
>> Barring that, there is also a 'dist()' function that can be used to 
>> work with multiple numeric fields in order sort results based on 
>> closeness to a desired coordinate. The 'dist function takes a 
>> parameter to specify the means of calculating the distance. (For example, 2 
>> -> 'Euclidean distance'.
>> I don't know the other options.)
>> 
>> In the worst case, my response is worthless, but pops your question 
>> back up in the e-mails...
>> 
>> Regards,
>> John
>> 
> 
> 
> 
> --
> Sincerely yours
> Mikhail Khludnev
> Principal Engineer,
> Grid Dynamics
> 
> <http://www.griddynamics.com>
> <mkhlud...@griddynamics.com>

Reply via email to