MitchK, I need a range filter, not a token filter. I'm trying to
filter on ranges. If you have code, I'd love to see it.

Israel, I've been using the JTeam spatial plugin as a model for my
work. I initially tried to use the plugin, but there were some serious
bugs in the code. I was able to make some changes based on the Lucene
spatial code, but other problems popped up.

I tried replacing the cartesian filter with a bounding box using
simple latitudes and longitudes by using a ChainedFilter with 2
numeric range filters and then passing it in to a lat/long distance
filter, but neither seemed to work out of the box. It's as if I need
to override the default getDocIdSet methods in order to actually get a
result.

Is there a need to override that method? On would think they should work as-is.

Thank you both for your help.

On Sun, Apr 11, 2010 at 4:34 AM, Israel Ekpo <israele...@gmail.com> wrote:
> He is referring to the org.apache.lucene.search.Filter classes.
>
> Michael,
>
> I did a search too and I could not really find any useful tutorials on the
> subject.
>
> You can take a look at how this is implemented in the Spatial Solr Plugin by
> the JTeam
>
> http://www.jteam.nl/news/spatialsolr.html
>
> Their code, I believe, uses the bits() method which has been deprecated in
> Lucene 2.9 and removed in 3.0.
>
> The getDocIdSet() method returns a BitSet object which you can prepare from
> org.apache.lucene.util.OpenBitSet
>
> I think there is probably some example in the new version (2nd Edition) of
> the *Lucene In Action *book on how to do something similar.
>
> You should check it out from the Manning Early Access Program page.
>
> http://www.manning.com/hatcher3/
>
> You should also check out the Solr 1.5 source code for how some of the
> Lucene Filter classes are designed.
>
>
>
> On Sat, Apr 10, 2010 at 5:23 AM, MitchK <mitc...@web.de> wrote:
>
>>
>> Hi Michael,
>>
>> do you mean a TokenFilter like StopWordFilter?
>>
>> If you like, you could post some code, so one can help you.
>> It's really easy to develop some TokenFilters, if you have a look at
>> already
>> implemented ones.
>>
>> Kind regards
>> - Mitch
>> --
>> View this message in context:
>> http://n3.nabble.com/Tutorials-for-developing-filter-plugins-tp706874p709897.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>
>
>
> --
> "Good Enough" is not good enough.
> To give anything less than your best is to sacrifice the gift.
> Quality First. Measure Twice. Cut Once.
> http://www.israelekpo.com/
>

Reply via email to