Re: How do I use MultiTermQuery.Rewrite when working with a MemoryIndex

2012-08-22 Thread Dave Seltzer
eMail: u...@thetaphi.de > > > -Original Message- > > From: Dave Seltzer [mailto:dselt...@tveyes.com] > > Sent: Wednesday, August 22, 2012 4:23 PM > > To: java-user@lucene.apache.org > > Subject: How do I use MultiTermQuery.Rewrite when working with a >

How do I use MultiTermQuery.Rewrite when working with a MemoryIndex

2012-08-22 Thread Dave Seltzer
Hello, I have a program which regularly creates a MemoryIndex to be searched against a list of queries. In order to transform the queries that I'm being sent I need to be able to call MultiTermQuery.Rewrite(IndexReader) So how do I use MultiTermQuery.Rewrite when working with a MemoryIndex? I'v

Re: Creating Span Queries from Boolean Queries

2012-08-21 Thread Dave Seltzer
So I've taken my first shot at solving my problem using the three functions below. When I set the slop to 10 it produces the following result: This BooleanQuery +content:"london olympics" +(+content:football +content:or +content:soccer) -content:nfl becomes this SpanQuery: spanNot(spanNear([spanN

Re: Creating Span Queries from Boolean Queries

2012-08-21 Thread Dave Seltzer
t; > --**--**- > To unsubscribe, e-mail: > java-user-unsubscribe@lucene.**apache.org > For additional commands, e-mail: > java-user-help@lucene.apache.**org > > -- Dave Seltzer Chief Systems Architect TVEyes (203) 254-3600 x222

Creating Span Queries from Boolean Queries

2012-08-21 Thread Dave Seltzer
Hi Everyone, If there was a straightforward way to take a Boolean Query created by the Lucene Query Parser and convert it to a Span Query. Ideally I'd like to take any ANDed clauses and require them to occur withing $SPAN of the other ANDs. I can't quite wrap my head around how to solve the prob

RE: Pattern Analyzer

2012-07-13 Thread Dave Seltzer
least I'd check that out first. Best Erick On Thu, Jul 12, 2012 at 2:20 PM, Dave Seltzer wrote: > Hello, > > I have a search project which uses the Lucene PatternAnalyzer for its > text/query analysis. > > At the moment it's configured like so: > analyzer = new P

Is creating an analyzer expensive?

2012-07-12 Thread Dave Seltzer
I have one more question to pose to the group today: I have several thousand searches being performed against MemoryIndexes on a regular basis. I'd like the ability for each search to choose it's own Analyzer, such that some queries could use a regex pattern, other queries could use the Standard

Pattern Analyzer

2012-07-12 Thread Dave Seltzer
Hello, I have a search project which uses the Lucene PatternAnalyzer for its text/query analysis. At the moment it's configured like so: analyzer = new PatternAnalyzer(Version.LUCENE_35, Pattern.compile("\\s+"), true, null); My goal here was to split words based on spaces and make things case in

Lucene 3.5 Query Parser Question

2012-07-11 Thread Dave Seltzer
Hello, I'm interested in searching a MemoryIndex to find occurrences of HashTags. To do this I'm trying to use the following query: #* -#[0 TO 9] My goal with this query is to look for any word starting with "#" except for words like "#1". However, when I parse this query, the query parser turn

RE: MemoryIndex "field must not be added more than once"

2012-03-12 Thread Dave Seltzer
e: MemoryIndex "field must not be added more than once" > > Easiest way to do that would be to append all your values together and then > add them in one pass. Unfortunately, you can only add a field + values once. > > -Stephen > > On Wed, Mar 7, 2012 at 9:39 AM, Da

MemoryIndex "field must not be added more than once"

2012-03-07 Thread Dave Seltzer
I'm using a MemoryIndex to search in-memory content. I was wondering if there's a way to specify multiple values for the same field in a MemoryIndex. I've tried addField but it throws an exception: index.addField("foobar", "value1", LuceneAnalyzer); index.addField("foobar", "value2", LuceneAnaly

Working with MemoryIndex results

2012-02-08 Thread Dave Seltzer
Hello, I'm using a MemoryIndex in order to search a block of in-memory text using a lucene query. I'm able to search the text, produce a result, and excerpt a highlight using the highlighter. Right now I'm doing this: MemoryIndex index = new MemoryIndex(); index.addField("content", fullText, Luc

RE: Searching a string using lucene

2012-01-31 Thread Dave Seltzer
t; your mileage may vary. If you have all your queries predefined, this could be a pretty fast way to get where you want to go. Stephen On Tue, Jan 31, 2012 at 10:50 AM, Dave Seltzer wrote: > Hello, > > > > I'm having a bit of trouble Googling this, so I'm hop