In lucene.net can we search for a content without giving field name..and it will search in all fields that are indexed.
标签:
lucene.net
相关问题
- Lucene.net 4.8 - IDE doesn't recognize Lucene.
- How can I check if a Lucene IndexWriter instance i
- Lucene .NET search results
- Condition to check whether document exists in Inde
- Lucene.Net and I/O Threading issue
相关文章
- Lucene.NET through NHibernate.Search and POCO Enti
- How can I use Lucene's PriorityQueue when I do
- In lucene.net can we search for a content without
- Combining hits from multiple documents into a sing
- How do I perform an AND search in Lucene.net when
- Storing relational data in a Lucene.NET index
- lucene.net combine multiple filters and no search
- How to integrate NHibernate with Lucene.Net
You cannot search for content without giving field name, however you can use MultiFieldQueryParser to search in all available fields.
E.g
here is complete an example.
hope that help
It will search all fields which are specified in the schema as searched by default.
Use MultiFieldQueryParser to parse your queries, and provide it with a array of the field names you want searched.
The query doesn't need any special syntax. If your query is "cat hat" it will search all the specified fields for either of these terms. If your default operator is AND, it will require that each term be found in at least one field.