CANNOT use a * or ? symbol as the first character of a search.

2009-12-27 Thread liujb
oh,my god, Query Parser Syntax CANNOT use a * or ? symbol as the first character of a search. that's mean I can't wrinte a search string like '*test'. this will be cause a great restriction to use lucence. but ,that's a really a important search scene. can you give me some advice on this prob

Re: SpanScorer example with lucene 3.0.0

2009-12-27 Thread liujb
oh,my god, Query Parser Syntax CANNOT use a * or ? symbol as the first character of a search. that's mean I can't wrinte a search string like '*test'. this will be cause a great restriction to use lucence. but ,that's a really a important search scene. can you give me some advice on this prob

SpanScorer example with lucene 3.0.0

2009-12-27 Thread Ben Jiang
Hi, there, first of all, thanks for the awesome work! We have migrated to lucene 3.0. We are very tempted to use SpanQuery, as it seems to favor document ranking based on proximity (eg, within a document, the distance of the matches is important to the document ranking, or even the most impor

Re: Using the new tokenizer API from a jar file

2009-12-27 Thread Chris Hostetter
: I tried to use it with solr and the problems began. It's always telling me : that it cannot find the class GlossAttributeImpl. I think the problem is : that my jar file is added to the class path at run time not from the command : line. Do you have a good solution or workaround? You're likely t

Re: Basic question about indexing certain words

2009-12-27 Thread syedfa
Thanks very much for such a detailed reply, I didn't realize that there was so much to this subject. I understand the issue a bit better now! Take care. Erick Erickson wrote: > > It depends completely on what analyzer you use. Conceptually, an Analyzer > is composed of a Tokenizer followed by

Re: Basic question about indexing certain words

2009-12-27 Thread Erick Erickson
It depends completely on what analyzer you use. Conceptually, an Analyzer is composed of a Tokenizer followed by any number of Filters. So the input stream is broken up by the Tokenizer, then each token has one or more Filters applied (e.g. LowerCaseFilter, StopWordFilter).. The reason I'm not ans

Basic question about indexing certain words

2009-12-27 Thread syedfa
Dear fellow Java developers: I have a very basic question about indexing text using Lucene. I am indexing a large amount of text, that includes names that contain certain punctuation (eg. "Jane Doe-Smith", "Sa'eed", etc.) Will the punctuation throw off the indexer in any way, such that it break

RE: Using the new tokenizer API from a jar file

2009-12-27 Thread Uwe Schindler
Where did you place the jar file inside Solr on which servlet container? I suspect some strange classloader problems. As the attributes are loaded by lucene, the impl should be available from classes inside lucene-core.jar file and placed in the same classpath of the lucene-core.jar classloader. -

Using the new tokenizer API from a jar file

2009-12-27 Thread Ahmed El-dawy
Hello all, I've built a tokenizer which uses the new tokenizer API (the one with the Decorator Pattern). I built a new AttributeReader called GlossAttribute and GlossAttributeImpl. I packaged it into a jar file and it's working very fine. I tried to use it with solr and the problems began. It's a

Re: BooleanScorer

2009-12-27 Thread Michael McCandless
BooleanQuery uses BooleanScorer when possible because that gives better performance than BooleanScorer2. If you really want to force it, you'd need to create the weight/scorer yourself, passing "true" for scoreDocsInOrder. Alternatively, you could make your collector, for example wrapping another

Re: TermDocs.close

2009-12-27 Thread Michael McCandless
It's confusing... but it is in fact safe not closing it (for Lucene's core IndexReader impls) -- because the IndexInputs that SegmentTermDocs/Positions use are clones, their close methods are a no-op. Mike On Sun, Dec 27, 2009 at 6:37 AM, John Wang wrote: > Hi: >   I see TermDocs.close not being

TermDocs.close

2009-12-27 Thread John Wang
Hi: I see TermDocs.close not being called when created with TermQuery: TermQuery creates it and passes to TermScorer, and is never closed. I see TermDocs.close actually closes the input stream. Is it safe not closing TermDocs? Thanks -John