lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Theodoros Vasilopoulos" <>
Subject Lucene.NET Search
Date Thu, 04 Oct 2007 09:02:05 GMT

I need to build an advanced search using Lucene.NET. When I say advanced I
actually mean something simple like:

I have 52 documents which are divided into 30 categories and I need to
develop a solution that will do the following.

1. Return all documents(silly but required )
2. Return all documents for a single category.
3. Search in all documents.
4. Search in a specific category.

Numbers 1,2,3 are quite easy.

1. I have added a field called "all" which contains the value "all" , so
whenever I need all of the documents I build a Query that searches for the
word "all" in the filed "all".
query = QueryParser.Parse("all", "all", new StandardAnalyzer());
problem solved

2. I have added another field that contains the category that the specific
document belongs to. So, I simply ask for that category like this:
query = QueryParser.Parse("\"" + comboBox1.Text + "\"", "subject", new
problem solved

3. Quite simple and straight-forward really. Just a plain full-text search
in the document.
query = QueryParser.Parse(this.textBoxQuery.Text, "text", new
problem solved

and now for the big one
4. ????
Is it possible to combine queries in order to create something that looks
like this:

{text:hello subject:greetings}


Am I on the wrong path and have to do something else?

Can anyone PLEASE help me, I am really frustrated...

Thank you

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message