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 John Colvin <jo...@mygeneration.fsnet.co.uk> on 2004/04/25 18:48:23 UTC

Problems indexing with keywords

Hi
I am creating an index with StandardAnalyzer and searching with the same.

I have added keyword fields to the index which contain something like this:

Rev_.12.04.2004
/root/navroot/10 Modules/drawer 1/drawer 2/job AK

When searching with the StandardAnalyzer I get nothing back when searching
for 'fieldname:Rev*' or as a prefix of the above
path'field:"/root/navroot/10 Modules*"'. If I don't add the '*' I still get
0 results.

 Can someone give me an indication of what I need to do to get this working,
I gather I need a custom analyzer but Im not sure what is required within.

Thx in advance
John






---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Re: Problems indexing with keywords

Posted by Brisbart Franck <Fr...@kelkoo.net>.
Hi,
when you index your field as a keyword, it's not indexed and thus the 
analyzer is not used for this field during the indexation.
But, if you make a search using the query parser with the 
StandardAnalyzer, it will be used for the parsing.
So, I suppose that in your query 'fieldname:Rev*', the 'R' is lowercased 
by the analyzer. And, as in your index you have the term 
'field:Rev_.12...', your requests don't return anything.

I hope this helps,
Franck Brisbart


John Colvin wrote:
> Hi
> I am creating an index with StandardAnalyzer and searching with the same.
> 
> I have added keyword fields to the index which contain something like this:
> 
> Rev_.12.04.2004
> /root/navroot/10 Modules/drawer 1/drawer 2/job AK
> 
> When searching with the StandardAnalyzer I get nothing back when searching
> for 'fieldname:Rev*' or as a prefix of the above
> path'field:"/root/navroot/10 Modules*"'. If I don't add the '*' I still get
> 0 results.
> 
>  Can someone give me an indication of what I need to do to get this working,
> I gather I need a custom analyzer but Im not sure what is required within.
> 
> Thx in advance
> John
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org