Lucene SOLR Browser Interface operation query and delete (10)

Source: Internet
Author: User
Tags solr sort
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.