In lucene.net can we search for a content without giving field name..and it will search in all fields that are indexed?

前端 未结 3 1103
一整个雨季
一整个雨季 2021-02-19 14:46

In lucene.net can we search for a content without giving field name..and it will search in all fields that are indexed.

3条回答
  •  猫巷女王i
    2021-02-19 15:09

    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.

提交回复
热议问题