djd0383 <[EMAIL PROTECTED]> wrote on 29/09/2006 11:20:37: > This all worked fine in v1.4 when using: > doc.add(Field.Text("allText", searchColumns));
The equivalent of 1.4 use doc.add(Field.Text("allText", searchColumns)); would be with 2.0: doc1.add(new Field("allText", searchColumns, Store.YES, Index.TOKENIZED)); So not storing the field content is one difference from your 1.4 code. I am not sure this is the problem cause, since I cannot tell if your application is using the stored content at all. But give it a try. > 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. What is the wrong behavior you see? Is it that the same query text did not return the expected documents? Or do you see some results without, say, the correct summary? If this one is the case, most likely your application is counting on stored text so the change above might fix that. > 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? Yes and no. This should not cause the problem you now have. But this is not efficient, as opening a searcher takes time, and getting it to speed (warming up 'system IO') takes longer. You would see faster search if you use keep a single searcher instance to be used for queries (you can use the same searcher for concurrent searches) and re-open that searcher once in a while - when the index was updated. There were several discussions on this in the mailing list, and I think the FAQ also mentions this. > 'search' is the desired search string > 'searchText' is the choosen indexing string > -both these strings are correctly entered I realized that. I was asking about an example of theactual strings that demostrates the problem. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]