My goal is this: I try to restrict search results to spesific pages that
have spesific metadata fields set to known values. So I add a few
checkboxes to the search form in addition to text input so that the user
can make restrictions for example looking like this

Location
[ ] UK   [X] USA

So I used this example
http://wiki.apache.org/nutch/WritingPluginExample-0%2e9
to index the metafields in question. And now when I check with Luke what
the index looks like it has those fields in place. But my problem is that
when ever I try to search something and at the sametime restrict the query
to some spesific location (in this case) I get zero results. The same goes
when I use only the text input to make a query like this
wordtosearchfor +location:USA
or I when I set programmitcally the loation field in Query object with
addRequiredPhrase("USA","location") or with addRequiredTerm...

I have checked that my queryfilter gets executed in every query and have
tried to change the class that my filter extends to RawFieldQueryFilter. I
have even tried to add the location field to default fields in
BasicQueryFilter (I was desperate). I have also tried to change the way
Lucene indexes the fields I save (stored or no stored, tokenized or
untokenized).
At one point I thought that there was a bug in the field search feature
but then I noticed that I do get some results with queries like this
wordtosearchfor +url:urlcontainingtheword
and after that I tried to mimic everything that was done to url field
(from parsing to indexing and to querying). But to no avail. Always zero
results.

I've already spent too much time working on this and I'm obviously on a
wrong track here :)

Any toughts someone? There propably is a plugin ready that does the same
thing I try to accomplish here (you can point me to it) but I really would
like to know what I'm doing wrong.

cheers,
Ilari

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Nutch-general mailing list
Nutch-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nutch-general

Reply via email to