lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Hummel <hum...@informatik.uni-mannheim.de>
Subject RegexQuery on multiple fields?
Date Thu, 04 Oct 2007 15:05:14 GMT
Hi,

I've recently tried the RegexQuery with Lucene which works fine with the
following code snippet:

  Hits hits;
  String q = "someregex";
  Term t = new Term("content", q);
  Query query = new RegexQuery(t);
  hits = searcher.search(query);

However, I wonder whether it is possible to use a QueryParser together with the
RegexQuery to determine the field to be searched on dynamically?

I wasn't able to find a solution in the API. Anybody knows one? Or is this not
possible?

Thanks in advance!

  Oliver



--
http://merobase.com - find source code, components and web services

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message