lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djd0383 <ddigm...@formos.com>
Subject Re: Upgrading 1.4 to 2.0 - Indexing Issue.
Date Fri, 29 Sep 2006 18:20:37 GMT

When you say open reader/searcher after closing writer.  I am currently
creating an instance of these after creating the query while a user is
searching.  Is this good enough?

Indexing/Searching are using StandardAnalyzer()

'search' is the desired search string
'searchText' is the choosen indexing string
-both these strings are correctly entered


Doron Cohen wrote:
> 
> Two quicks things I can think of:
> - make sure that 'fieldToSearch' == "allText"
> - make sure writer is closed after all docs added and then open the
> reader/searcher
> 
> Otherwise, can you provide more info:
> - at least one example where it "doesn't work":
>   - 'searchText' - the text of the field added to the document, that
> should
> be returned by the query but is not.
>   - 'search'  - the query text, for the query that should find that
> document, but does not.
> - which analyzer is used at search
> - which analyzer used at indexing
> 
> 
> djd0383 <ddigmann@formos.com> wrote on 29/09/2006 10:28:18:
>>
>> I am in the process of trying to upgrade to v2.0 from v1.4 and am having
>> trouble building my index.  For each of the various entries in the
> database,
>> I am more or less doing the following:
>>
>> doc1.add(new Field("allText",searchText,Store.NO,Index.TOKENIZED));
>> indexWriter.add(doc1);
>>
>> This seems to build an incorrect index.  I know this is true because I
> can
>> see entries that are not indexed.  The searching and indexing have been
>> minorly editted from the v1.4 code and seem to be correct.
>>
>> My query is like the following if this helps too:
>>
>> final Query query;
>> QueryParser qp = new QueryParser(fieldToSearch,analyzer);
>> query = qp.parse(search);
>>
>> Thanks for your help.
>> --
>> View this message in context: http://www.nabble.com/Upgrading-1.4-
>> to-2.0---Indexing-Issue.-tf2358182.html#a6569399
>> Sent from the Lucene - Java Developer mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-dev-help@lucene.apache.org
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Upgrading-1.4-to-2.0---Indexing-Issue.-tf2358182.html#a6570180
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.


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


Mime
View raw message