IndexSearcher and Multiple Threads

2008-01-28 Thread Cam Bazz
Hello, Is IndexSearcher ThreadSafe? I made a simple httpserver using grizzly as described in http://jlorenzen.blogspot.com/2007/06/using-grizzly-to-create-simple-http.html which submit queries to a single instance of indexsearcher and I get some errors (when I query with more then one threads) suc

Re: Lucene Performance

2008-01-28 Thread Thibaut Britz
Thanks for your answer, I will look into this in more detail. Paul Elschot wrote: > > On Friday 18 January 2008 17:52:27 Thibaut Britz wrote: >> >> Hi, >> > ... >> >> Another thing I noticed is that we append a lot of queries, so we have a >> lot >> of duplicate phrases like (A and B or C)

hitcollector and sort

2008-01-28 Thread Cam Bazz
Hello, How can I use a hit collector and sort object in query? I looked at the API and sort is only usable with hits. Is it even possible? since hitcollector returns a bitset - how do we do the ordering? Best, -C.B.

Re: hitcollector and sort

2008-01-28 Thread Mark Miller
Take a look at org.apache.lucene.search.TopFieldDocCollector : http://lucene.apache.org/java/2_3_0/api/org/apache/lucene/search/TopFieldDocCollector.html Cam Bazz wrote: Hello, How can I use a hit collector and sort object in query? I looked at the API and sort is only usable with hits. Is it

TermVector

2008-01-28 Thread spring
Hi, how do I get the TermVector from a document which I have gotten from an IndexSearcher via IndexSearcher#search(Query q). Luke can do it, but I do not know how... Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For a

RE: TermVector

2008-01-28 Thread spring
Sorry, this was a bit nonsense ;) I store a document with a content field like this: Document#add(new Field("content", someReader, TermVector.WITH_OFFSETS)); Later I search this document with an IndexSearcher and want the TermPositions from this single document. There is a IndexReader#termPosit

Re: TermVector

2008-01-28 Thread Grant Ingersoll
See IndexReader.getTermFreqVector() and various versions of that. Also, search the archives for Term Vector, as you will find discussion of it there. You may also, eventually, be interested in the new TermVectorMapper capabilities in 2.3 which should help speed up the processing of term ve

Re: CustomScoreQuery Not Returning Value in Index

2008-01-28 Thread Briggs
One correction, my valSrcScore was '0.7002756' not ''8.614598'. But, again, it's not what I expected. On Jan 28, 2008 12:34 PM, Briggs <[EMAIL PROTECTED]> wrote: > I am trying to 'muck' with document scores from Lucene. I have > certain business rules where I have a field named 'domainScore' wit

Re: IndexSearcher and Multiple Threads

2008-01-28 Thread Erick Erickson
The IndexSearcher is thread-safe. The QueryParser is *not*. From the JavaDocs for QueryParser Note that QueryParser is *not* thread-safe. So I'd guess you're using a single QueryParser across multiple threads. Just use a new one each time, they're not expensive... Best Erick On Jan 28, 200

Re: CustomScoreQuery Not Returning Value in Index

2008-01-28 Thread Tom Emerson
Hi, In the constructor for your DomainCustomScoreQuery try calling setStrict(true); after invoking the superclass ctor. I think that will fix the problem you're seeing. On Jan 28, 2008 12:34 PM, Briggs <[EMAIL PROTECTED]> wrote: > I am trying to 'muck' with document scores from Lucene. I hav

RE: TermVector

2008-01-28 Thread spring
> Also, search the archives for Term Vector, as you will find > discussion > of it there. Ah I see, I need to cast it to TermPositionVector. OK. > You may also, eventually, be interested in the new > TermVectorMapper capabilities in 2.3 which should help speed up the > processing of term

Re: CustomScoreQuery Not Returning Value in Index

2008-01-28 Thread Briggs
Cool, that worked, sort of. The customScore method that is overridden from CustomScoreQuery has a signature of: public float customScore(final int doc, final float subQueryScore, final float valSrcScore); The javadoc states that the valSrcScore is the value from the field of my ValueSourceQuery.

CustomScoreQuery Not Returning Value in Index

2008-01-28 Thread Briggs
I am trying to 'muck' with document scores from Lucene. I have certain business rules where I have a field named 'domainScore' within my index. The 'domainScore' value is a float. What I want to do is add this value to the document sub query score from the Lucene search. I have implemented a Cu

Re: svnversion not found...help!!!

2008-01-28 Thread Chris Hostetter
: jar-core: : [exec] Execute failed: java.io.IOException: Cannot run program : "svnversion": java.io.IOException: error=2, No such file or directory : [jar] Building jar: /home/gen/lucene/lucene-2.2.0/build/lucene- : core-2.2.0.jar : default: : BUILD SUCCESSFUL : Total time: 6 seconds :

Re: IndexSearcher and Multiple Threads

2008-01-28 Thread Chris Hostetter
: Is IndexSearcher ThreadSafe? I made a simple httpserver using grizzly as ... : java.lang.NullPointerException : at org.apache.lucene.queryParser.QueryParser.jj_scan_token( ... : This error does not happen if I do searches one at a time. IndedSearcher is thread safe, QueryPar

Re: TermVector

2008-01-28 Thread Grant Ingersoll
On Jan 28, 2008, at 4:04 PM, <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> wrote: Also, search the archives for Term Vector, as you will find discussion of it there. Ah I see, I need to cast it to TermPositionVector. OK. yep You may also, eventually, be interested in the new TermVectorMapper

Re: Lucene to index OCR text

2008-01-28 Thread Daniel Noll
On Friday 25 January 2008 19:26:44 Paul Elschot wrote: > There is no way to do exact phrase matching on OCR data, because no > correction of OCR data will be perfect. Otherwise the OCR would have made > the correction... > The problem I see with a fuzzy query is that if you have the fuzziness set

Some Help needed in search.

2008-01-28 Thread Sure
Hi All, We are having an index with the fields, HEADING and WRITER. HEADING is having the high boost factor and WRITER is having a low boost. Let the data is as follows: HEADING WRITER Sachin Tendulkar scored century XYZ Australia won the serie