lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From syedfa <fayyazud...@gmail.com>
Subject Re: Displaying and highlighting results from a Wild Card and Fuzzy search using Lucene in Java
Date Thu, 19 Jun 2008 00:10:01 GMT

Thanks so much for your responses, I have it figured out:

Query parser=new WildcardQuery(new Term("LINES", "the*"));
         parser=parser.rewrite(IndexReader.open(fsDir));

and I was able to get my results highlighted for both WildCard and Fuzzy
searches.

Thanks for the responses.
Sincerely;
Fayyaz


markrmiller wrote:
> 
> Chris Hostetter wrote:
>> : why your are getting that error...that is the type of error you would
>> get if
>> : you were trying to use IndexReaders Protected constructor outside the
>> index
>> : package...but you are correctly using the static open call...
>>
>> not quite...
>>
>> : >         IndexReader	ir = new IndexReader().open(fsDir);
>>
>> ...that should be...
>>
>>             IndexReader ir = IndexReader.open(fsDir);
>>
>> ..correct?
>>
>>
>>
>>
>> -Hoss
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>   
> I am sadly lost without my syntax Highlighting :) Nice catch.
> 
> You need to use the static method rather than try and instantiate a new 
> IndexReader and then call the static method on the instantiated object.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Displaying-and-highlighting-results-from-a-Wild-Card-and-Fuzzy-search-using-Lucene-in-Java-tp17582678p17994732.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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


Mime
View raw message