Ignore Words

2003-01-21 Thread Heinz Bruhin
How can I show the words, which are ignored?

Example:
String searchString = This is a Question

The Ignored Words are: is and a

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Lucene Turbine Service

2003-01-21 Thread Seth Weiner
Hi,

I'm fairly new to Lucene and am trying to create a 'simple' Turbine
webapp that will use Lucene for some indexing.  Has anyone written a
simple Turbine/Fulcrum Lucene service for searching and indexing
documents?

Thanks,
Seth Weiner


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Lucene Turbine Service

2003-01-21 Thread Seth Weiner
Thanks for the pointer!  Might I ask what the motivation for the
refactoring was?

On a separate note I just took a look at the service in the sandbox.  It
doesn't appear to support addition of documents to the index.  Shouldn't
be hard to add, just seems like a strange ommision.  Also, wouldn't it
be more efficient for the service to maintain a pool of IndexSearchers
rather than creating a new one for each search?  Or is there a problem
with holding one or more index searchers open on an index?  To
add/remove a document to the index, would all of the IndexSearchers need
to be closed, or is this safe to do?

The simple app I'm trying to write allows for the searching of an index
through a turbine webapp interface as well as the ability to upload a
document through the webapp to be added to the index.  If the document
exists in the index it's deleted and then the new version is added.  If
anyone's already done this feel free to share;)  And while you're in a
charitable mood, my next step is to take the Lucene service and make it
an XMLRPC webservice.  Thoughts and suggestions on that idea are greatly
appreciated.

Thanks,
Seth

-Original Message-
From: Kelvin Tan [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 21, 2003 7:16 PM
To: Lucene Users List
Subject: Re: Lucene Turbine Service


Yep. Look in Lucene Sandbox. Interesting you should ask, though, 
because after about a year of using the LuceneSearchService, I've 
recently refactored it out into a subsystem of its own...:-)


Regards,
Kelvin


The book giving manifesto - http://how.to/sharethisbook


On Tue, 21 Jan 2003 18:44:33 -0500, Seth Weiner said:
Hi,

I'm fairly new to Lucene and am trying to create a 'simple' Turbine 
webapp that will use Lucene for some indexing.  Has anyone written a 
simple Turbine/Fulcrum Lucene service for searching and indexing 
documents?

Thanks, Seth Weiner


--
To unsubscribe, e-mail:   mailto:lucene-user-
[EMAIL PROTECTED] For additional commands, e-mail:
mailto:lucene-user-
[EMAIL PROTECTED]




--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Range queries

2003-01-21 Thread Tatu Saloranta
My apologies if this is a FAQ (which is possible as I am new to Lucene, 
however, I tried checking the web page for the answer).

I read through the Query syntax web page first, and then checked the 
matching query classes. It seems like query syntax page is missing some 
details; the one I was wondering about was the range query. Since query 
parser seems to construct these queries, I guess they have been implemented, 
even though syntax page didn't explain them. Is that correct?

Looking at QueryParser, it seems that inclusive range query uses [ and ], and 
exclusive query { and }? Is this right? And does it expect exactly two 
arguments?
Also, am I right in assuming that range uses lexiographic ordering, so that it
basically includes all possible words (terms) between specified terms (which 
will work ok with numbers/dates as long as they have been padded with zeroes 
or such)?

Another question I have is regarding wildcard search. Page mentions that there 
is a restriction that search term can not start with a wild card (as that 
would render index useless I guess... would need to full scan?). However, it 
doesn't mention if multiple wildcards are allowed? All the example cases just 
have single wild card?

Sorry for the newbie questions,

-+ Tatu +-

ps. Thanks for the developers for the neat indexing engine. I am currently 
evaluating it for use in a large-scale enterprise content management system.


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: how to join 2 queries togther

2003-01-21 Thread Otis Gospodnetic
It should all be pretty clear from the API javadocs.  Take a look at
BooleanQuery, which is that single query that you can add other
queries.
Good luck.

Otis



--- Charles [EMAIL PROTECTED] wrote:
 Hi everyone,
 
 First of all I'd like to thank you guys for developing a great search
 engine
 framework. I've tested it out and it works flawlessly (and really
 fast too).
 
 Right now I plan to create a more advance search capability. I
 understand
 how to construct the Query object using the QueryParser, but I would
 like to
 know how I can add in different types of queries (like range, terms,
 boolean) all into one. I'm not sure if I can do this with the
 QueryParser
 and am looking for information on how to manually construct a Query
 object
 so i can combine all these requirements.
 
 Here's what I want to do: I would like to have the user select values
 from a
 combo box (e.g. Price range, Area, Country, Number of rooms, land
 area, is
 Freehold or Leasehold etc). From what I gather this involves several
 type of
 queries including RangeQuery (for the price range), a TermQuery,
 BooleanQuery etc. So the question is how do i combine all these types
 of
 queries into one so I can obtain a single Hits result that matches
 all these
 requirements?
 
 Any advice or urls is very much appreciated.
 Charles
 
 
 - Original Message -
 From: alex [EMAIL PROTECTED]
 To: Lucene Users List [EMAIL PROTECTED]
 Sent: Tuesday, January 21, 2003 3:23 PM
 Subject: Re: how to join 2 queries togther
 
 
  Thank you everyone for your help
 
 
  - Original Message -
  From: Lichtner, Guglielmo [EMAIL PROTECTED]
  To: 'Lucene Users List' [EMAIL PROTECTED]
  Sent: Monday, January 20, 2003 9:52 PM
  Subject: RE: how to join 2 queries togther
 
 
  
   From this code I think I see a possible problem.
  
   I think one way to fix it is to parse the word in readLine() and
 add a
  term
   query for each:
  
   BooleanQuery query = new BooleanQuery();
   System.out.print(will all of the words );
   StringTokenizer tok1 = new StringTokenizer(in.readLine());
   while (tok.hasMoreTokens()) {
   query.add(new TermQuery(new Term(content,
 tok1.nextToken()), true,
   false);
   }
   System.out.print(without the words);
   StringTokenizer tok2 = new StringTokenizer(in.readLine());
   while (tok.hasMoreTokens()) {
   query.add(new TermQuery(new Term(content,
 tok2.nextToken()),
 false,
   true);
   }
   System.out.println(Searching for:  + query);
   Hits hits = searcher.search(query);
   System.out.println(hits.length() +  total matching documents 
 );
  
  
   -Original Message-
   From: alex [mailto:[EMAIL PROTECTED]]
   Sent: Monday, January 20, 2003 2:57 PM
   To: Lucene Users List
   Subject: Re: how to join 2 queries togther
  
  
   thxs for your suggestion this is what i have written but it does
 not
 work
   any suggestion on how to get it to work ?
  
System.out.print(will all of the words );
   String q1 = in.readLine();
System.out.print(without the words);
   String q2 = in.readLine();
  
   BooleanQuery query = new BooleanQuery();
 Query matchall = QueryParser.parse(q1, content,
 analyzer);
   query.add(matchall, true, false);
 Query exclude = QueryParser.parse( q2, content ,
  analyzer);
   query.add(exclude, false, true);
  
   System.out.println(Searching for:  +
 query.toString(content));
   Hits hits = searcher.search(query);
   System.out.println(hits.length() +  total matching
 documents
 );
  
  
   - Original Message -
   From: Lichtner, Guglielmo [EMAIL PROTECTED]
   To: 'Lucene Users List' [EMAIL PROTECTED]
   Sent: Monday, January 20, 2003 4:04 PM
   Subject: RE: how to join 2 queries togther
  
  
   
I'm a newbie, but I could suggest this:
   
BooleanQuery bq = new BooleanQuery();
bq.add(firstQuery, true, false);
bq.add(secondQuery, false, true);
   
That should make the first query required, and the second
one prohibited, which is like saying +firstQuery -secondQuery
   
I haven't tried this myself but I did try this for an either/or
   combination,
and it does work for me.
   
-Original Message-
From: alex [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 20, 2003 10:54 AM
To: Lucene User
Subject: how to join 2 queries togther
   
   
hi all
   
I have a method which takes in a normal query breaks into token
 and
  places
   +
in front it
I have a second method which does the same instead puts a -
 sign front
  the
token
   
the reason i have done this is so that the user do not need to
 add +
  and -
signs by themselfs and also I cound
 not get the booleanQuery to work
   
this makes it so that i have 2 queries
   
1) a file must contain all these words
2) a file must exclude this words
   
my question is how do join these 2 queries togther so it
 filters out