construct a field without analyzer?

2011-02-14 Thread Yuhan Zhang
Hi all, I am trying to index documents by phrases (multiple words) in the text, and want to get around the StandardAnalyzer for this field. (however, I will still use standardAnalyzer for the other fields in the same document). so, how should I approach it? is there a way to construct a field by

Re: Storing payloads without term-position and frequency

2011-02-02 Thread Yuhan Zhang
HI Alex, you can specify the infomation to be stored on a field by setting Field.TermVector.NO doc.add(new Field(TEXT_FIELD_NAME, text, Field.Store.NO, Field.Index.ANALYZED, Field.TermVector.NO)); On Wed, Feb 2, 2011 at 11:35 AM, Alex vB wrote: > > Hello everybody, > > I am currently using Luc

Re: Query parse errors for dashes in Lucene (3.0.3)

2011-01-24 Thread Yuhan Zhang
Hi Andrew, you can escape the special characters in the string that QueryParser reserves by: String queryString = QueryParser.escape( queryString ); Query query = QueryParser.parse( queryString ); Yuhan On Mon, Jan 24, 2011 at 6:03 PM, Andrew Kane wrote: > Wow, passing the buck doesn't really

Re: search on a field that is NOT_ANALYZED

2011-01-19 Thread Yuhan Zhang
oh, TermQuery works! it was my own mistake. thanks for the help! Yuhan On Wed, Jan 19, 2011 at 5:17 PM, Yuhan Zhang wrote: > Hi Paul and Earl, > > thanks. > > I tried TermQuery. it gave me back zero document my termDocs is also > empty... having a feeling that > no term wa

Re: [POLL] Where do you get Lucene/Solr from? Maven? ASF Mirrors?

2011-01-19 Thread Yuhan Zhang
On Tue, Jan 18, 2011 at 1:04 PM, Grant Ingersoll wrote: > As devs of Lucene/Solr, due to the way ASF mirrors, etc. works, we really > don't have a good sense of how people get Lucene and Solr for use in their > application. Because of this, there has been some talk of dropping Maven > support for

Re: search on a field that is NOT_ANALYZED

2011-01-19 Thread Yuhan Zhang
Hi Paul and Earl, thanks. I tried TermQuery. it gave me back zero document my termDocs is also empty... having a feeling that no term was gathered if a field was not analyzed. Yuhan On Wed, Jan 19, 2011 at 1:15 PM, Earl Hood wrote: > On Wed, Jan 19, 2011 at 2:11 PM, Paul Libbrecht wrote: > >

search on a field that is NOT_ANALYZED

2011-01-19 Thread Yuhan Zhang
Hi all, I am trying to use *IndexSearcher * to retrieve a doc from an existing index by reading a field that is NOT_ANALYZED. I am trying to use that field

Re: Can not delete index file after close the IndexSearcher

2011-01-12 Thread Yuhan Zhang
Hi Garry, I am guessing the directory needs to be closed before opening a new one. dir.close(); dir = FSDirectory.open(new File(getIndexPath())); why not to open two IndexSearcher objects in an array of two instead of swapping them back and forth? it would be a lot easier. yuhan 2011/1/12 张志田