Hi,
I created a webpages index using Nutch-0.9, while indexing I added a
field named *s3-type* in each document.
At the time of searching, I'm able to see the same field name and
related value in each hit retreived but the issue
is that when I try to call addRequiredField to the query, it throws
error (at runtime) that field s3-type is not a known field.
Here is the code for adding the field at indexing time (in a plugin
extended from IndexingFilter):-
doc.add(new Field("s3-type", "some value", Field.Store.YES,
Field.Index.TOKENIZED));
This is the code during searching (when I try to add a field as required
field to query):-
Query newQuery = Query.parse("dummy query", <conf object here>);
newQuery.addRequiredTerm("value", "s3-type");
Hits hits = <index searcher obj here>.search(newQuery, 300, null,
null, false);
I'm able to search properly for all normal queries, the problem comes
only when I try to do addRequiredTerm
Basically I need to filter the results based on a particular field
(s3-type in this case).
Please help
Thanks
Jeet Singh