You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Luis Alves <la...@gmail.com> on 2009/08/04 20:45:33 UTC

Re: How do you Parse a query to convert numbers to strings

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