I am using solrnet. I have a title and Description fields. I need to search both fields simultaneously. How do I do this?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
Please try to pass the string array that contains multiple field names and search text in the below method. I will return the solrnet query for search with multiple filed name with OR condition.
Jayendra's answer is correct, but if you want to do this without aggregating data in a single field at index-time (copyFields) and want to do it at query-time instead using the standard handler instead of dismax, in SolrNet you can do:
See query operators and DSL for more information.
If you are using a standard request handler -
Create a new field title_description and copy the title and description field to this field.
Use that field as the default search field.
Query q fired with search on the default search field -
OR
If you can use dismax or edismax query parser, you can define a new request handler.
Define the query fields as qf.
Query - pass the dismax as the qt parameter which would search on the title and description fields