: thank you for joining the discussion :).

Heh ... no problem, i was a little behind on my mail for a while there ... 
but i'm catching up.

: 2) If I understood the API-documentation right, the behaviour of the
: FieldQParser depends exactly on what I've defined in my analyzer. 

right ... it's a parser that supports no markup, it just uses your 
analyzer to produce term or phrase queries.

: In the LuceneLengthQParser I instantiate a FieldQParser. This parser uses
: some filters which I have defined in my titleLength-field to retrive the
: QueryLength.
: Now I can forward QueryLength to a setMaxLength(int QueryLength, int
: increment)-method.
: The returnValue can appended to the QueryString. Afterwards the original
: LuceneQParser can do his job.

that would work, but it doesn't have to be a subclass relation ship, it 
oculd be composition -- and you don't have to append the length clause to 
the query string before calling super, you could call super.parse on the 
original string, let it build up a query string, and then programaticly 
add your length clause to it.

: To make sure that people can extend every parser they like, I would like to
: seperate the "rule-part" of my custom parser, so that they can easily extend
: other parsers by including the length-retrival-part.

this is where composition comes in -- take a look at how the BoostQParser 
works, it lets you do both of these w/o knowing anything special about 
the dismax or lucene QParsers...

   q={!boost b=log(popularity) defType=lucene}your search string&df=title
   q={!boost b=log(popularity) defType=dismax}your search string&qf=title

...you could likewise have a MaxLengthQParser that did something like...

   q={!maxlen f=titleLen r=0.8 defType=lucene}your search string&df=title
   q={!maxlen f=titleLen r=0.8 defType=dismax}your search string&qf=title

...which would delegate to the defType parser for the bulk of hte query, 
and then add a clause based on titleLen and your "r" ratio.

Except now that i think about it: you actually want to filter by a 
computed length right?  in that case you don't even need composition -- 
you can just leverage your new parser in an "fq" param to produce a single 
ConstantScoreRangeQuery to filter on based on the length of hte q param, 
and you can be completely ignoratne of what parser is used for hte main 
query...

   fq={!maxlen f=titleLen r=0.8 v=$q}&q=...

: However, there are two another understanding - questions:
: What does WDF mean and what does HTE stand for?

WDF = WordDelimiterFilter
HTE = I Have No Idea ... what context did you see it in?  

(if you mean "hte" that's just how i spell "the" when i'm not in the mood 
to pay attention to my spelling, which is always)



-Hoss

Reply via email to