Query Hits

2011-08-04 Thread Tan Weijian
Hi , I am currently using lucene 2.4, is there a way to count how many words from my query hits the post? Lets say my query is: APPLE OR BANANA OR ORANGE The post is: I have a banana, i love to eat banana and apple This case, banana keyword is hit twice and apple is hit once, is there a way t

Re: Grouping Clauses to Preserve Order of Boolean Precedence

2011-08-04 Thread Trejkaz
On Fri, Aug 5, 2011 at 1:57 AM, Jim Swainston wrote: > So if the Text input is: > > Marketing AND Smith OR Davies > > I want my program to work out that this should be grouped as the following > (as AND has higher precedence than OR): > > (Marketing AND Smith) OR Davies. > > I'm effectively lookin

Rewriting other query types into span queries and two questions about this

2011-08-04 Thread Trejkaz
Hi all. I am writing a custom query parser which strongly resembles StandardQueryParser (I use a lot of the same processors and builders, with a slightly customised config handler and a completely new syntax parser written as an ANTLR grammar.) My parser has additional syntax for span queries. T

How to determine memory required for searching

2011-08-04 Thread Trieu, Jason T
Hello, I keep getting java.lang.OutOfMemoryError while doing search and would like to get some ideas to resolve the issue.. BACKGROUND: IBM AIX server with 8 GIG of memory. Lucene index contains 625 million documents with each having roughly 200 bytes of stored fields/data. Running Lucene Inde

Re: Thread locking while merging (ConcurrentMergeScheduler issue?)

2011-08-04 Thread Michael McCandless
Indeed, from the log fragment I can see the merges are just really slow. You had 6 merges run: IW 0 [Wed Aug 03 22:43:24 CEST 2011; Lucene Merge Thread #0]: merged segment size=1234.550 MB vs estimate=1300.063 MB IW 0 [Thu Aug 04 00:15:54 CEST 2011; Lucene Merge Thread #4]: merged segment size=74

Re: Grouping Clauses to Preserve Order of Boolean Precedence

2011-08-04 Thread Jim Swainston
My Apologies Hoss, perhaps I should have been clearer. I'm trying to programatically build a BooleanQuery from text input. I want the BooleanQuery that is built to have the correct structure based on the precedence rules of Boolean Logic. So if the Text input is: Marketing AND Smith OR Davies I

Re: Grouping Clauses to Preserve Order of Boolean Precedence

2011-08-04 Thread Chris Hostetter
: But the query parser doesn't seem to do that for me with the input Marketing : AND Smith OR Davies. The query parser gives me 3 clauses. 1 must clause for i didn't say the QueryParser would do that with *that* input You asked... : > : Thanks Ian. How would you achieve the logic of the below q

Re: Grouping Clauses to Preserve Order of Boolean Precedence

2011-08-04 Thread Jim Swainston
But the query parser doesn't seem to do that for me with the input Marketing AND Smith OR Davies. The query parser gives me 3 clauses. 1 must clause for the term Marketing, 1 must clause for the term smith and 1 should clause for the term Davies. e.g. +Marketing +Smith SHOULD Davies. What I would l