AM
> To: java-user@lucene.apache.org
> Subject: Re: short search terms
>
> Hi
>
> You are searching with 3 characters but the items actually indexed has
> 4
> characters. Use Luke and analyze the index.
>
> If searching for ABC has to be matched with ABCD then you need
valueOf(searcher.doc(doc.doc).get("task")));
> }
> return taskIds;
> }
> }
> finally
> {
> try
> {
> if(reader != null)
> reader.close();
> }
> catch(IOException e)
> {
> }
> }
> }
>
>
}
finally
{
try
{
if(reader != null)
reader.close();
}
catch(IOException e)
{
}
}
}
> -Original Message-
> From: Chris Hostetter [mailto:hossman_luc...@fucit.org]
> Sent: Wednesday, September 26, 2012
: I have a key field that will only ever have a length of 3 characters. I am
: using a StandardAnalyzer and a QueryParser to create the Query
: (parser.parse(string)), and an IndexReader and IndexSearcher to execute the
: query (searcher(query)). I can't seem to find a setter to allow for a 3
: ch
ustom
Query?
> -Original Message-
> From: Arjen van der Meijden [mailto:acmmail...@tweakers.net]
> Sent: Wednesday, September 26, 2012 5:04 PM
> To: java-user@lucene.apache.org
> Subject: Re: short search terms
>
> Shouldn't your own application-logic handle thi
Shouldn't your own application-logic handle this? Or do you want
complicated query-parsing where each and every token in the query is
always at most 3 characters long?
I don't know if there are any easier solutions, but you could subclass
the QueryParser and add your requirement to all the rel