Adding fields to BasicQueryFilter

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Adding fields to BasicQueryFilter

julien nioche-3
Hi,

I have started to use Nutch recently. Congratulations, that's very
impressive! I look forward to discovering more about it.

I have been trying to add a custom field to those used by the
BasicQueryFilter and found no other way than modifying the code. What I
needed was that each term of the original query as was found at least in on
of the fields + search all the terms in a phrase query for each field. The
latter could easily be done in a separate QueryFilter, but not the former as
it would require to parse the boolean query obtained from the
BasicQueryFilter and modify the clauses to add my field(s) and assume that
the structure does not change etc...

Am I missing something? Is there a simple way to do that apart from
modifying the code? Would it make sense to modify the BQF so that it could
take the name + weights of the fields to use from the config (e.g. search
for a parameter name query.field_name.boost)?

Let me know if you think that is relevant and I'll send a patch for the BQF.

Best,

Julien

--
http://www.digitalpebble.com
Open Source Solutions for Text Engineering