First, queryVisit our SOLR admin's action page:
By clicking Execute Query, you can query the following results:
Second, deleteCreating a Query object for the information to be searched, Lucene generates the final query syntax based on the query object, similar to the relational database SQL syntax. Lucene also has its own query syntax, for example: "Name:lucene" indicates that the query field's name is "Lucene" of the Document information. There are two ways to create a query object:
Delete the index format as follows:
(1) Delete the index of the specified ID
<delete>
<id>8</id>
</delete>
(2) Delete the indexed data to the query
<delete>
<query>product_catalog_name: Humorous Grocery </query>
</delete>
(3) Delete all index data
<delete>
<query>*:* </query>
</delete> Query Index
Through the/select search index, SOLR formulates some parameters to complete the search for different needs:
1. Q-query string, must, if query all use *:*.
2. FQ (filter query), the role: in the Q query matches the results of the FQ query is also consistent, for example:
3. Sort-Sort, format: Sort=<field Name>+<desc|asc>[,<field name>+<desc|asc>] .... Example:
Descending by Price
4. Start-pagination display used, start recording subscript, starting from 0
5. Rows-Specifies the maximum number of records to be returned, with start for paging.
6. FL-Specifies that the contents of those fields are returned, separated by commas or spaces.
7. df-Specify a search field
You can also specify the default search field in the Conf/solrconfig.xml file in the Solrcore directory, and you can enter the keyword directly in the "Q" Query criteria after you specify it.
8. WT-(writer type) specifies the output format, which can have XML, JSON, PHP, Phps, and later SOLR 1.3 added, to be notified to us, because the default is not turned on.
9. HL is highlighted, set the Highlight field, set the format prefix and suffix.