lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luis Alves <lafa...@gmail.com>
Subject Re: How do you Parse a query to convert numbers to strings
Date Tue, 04 Aug 2009 18:45:33 GMT
Hi Paul,

In 2.9, you can use the "new query parser" in contrib.

You should look at:

original.config.FieldBoostMapAttribute           
original.config.FieldBoostMapFCListener        
original.processors.BoostQueryNodeProcessor
original.builders.BoostQueryNodeBuilder

this code implements boost values per field.

or look at:

original.config.FieldDateResolutionMapAttribute
original.config.FieldDateResolutionFCListener
original.processors.ParametricRangeQueryNodeProcessor
original.builders.RangeQueryNodeBuilder

this code implements DateResolution per field.

You would have to implement something similar.
You will need and Attribute, (FieldConfig)FCListener a Processor,
and you might need a new Builder or not.

And finally you can look at TestSpanQueryParserSimpleSample junit
to learn how assemble it together and change the new query parser
to use your own changes.

I hope this helps :)

-- 
-Lafa



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message