create_field_query method
Leave feedback
On this page
Adds a field to the specified query.
def create_field_query(cls, field_name, query):
...
| Parameter | Type | Description |
|---|---|---|
| field_name | str |
The field name to search in. |
| query | SearchQuery |
The query to add the field. |
Returns: SearchQuery: A query with the field to search in.
from groupdocs.search import SearchQuery
from groupdocs.search.options import CommonFieldNames
word_query = SearchQuery.create_word_query("Einstein")
field_query = SearchQuery.create_field_query(CommonFieldNames.CONTENT, word_query)
result = index.search(field_query)
- class
SearchQuery
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.