List Info

Thread: RegexQuery on multiple fields?




RegexQuery on multiple fields?
country flaguser name
Germany
2007-10-04 10:05:14
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-unsubscribelucene.apache.org
For additional commands, e-mail: java-user-helplucene.apache.org


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )