1. first assume that my data fields are: Name, tel, address preset Search is the Name field, if the data to be searched is exactly the name field, you do not need to specify the search field name.
2. Query Rules:
If you want to query a specific field (not a preset field), precede the query with the field name plus ":" (No "sign") symbol,
For example: Address: tel:88xxxxx1, Haidian District, Beijing Software Park
1>. Q represents query input
2>. Version stands for SOLR versions (this variable is not recommended)
3>. Start represents the result from which the result data starts, the default is 0 for the first pen, rows is to display a few data, preset to 10 pen
(because sometimes the query results may have hundreds of, but you do not need to show all the results, so the preset is from the first start to the tenth pen)
So to display the 10th to 30th pen, change to:
http://localhost:8080/solr/select/?indent=on&version=2.2&q=address: +tel:88xxxxx1&, Haidian District, Beijing, the software Park Version=2.2&start=10&rows= 20&indent=on
(indent represents the output of XML to be indented. Default is ON)
3. In addition, to limit the output of the content can be used "fl=" plus the name of the field you want, such as the following example:
http://localhost:8080/solr/select/?indent=on&version=2.2&q=text: Beijing + Or+text: billion degrees &start=0&rows=10 &fl=name,address,tel
Added Name,adress,tel after fl=.
So the result will be as follows:
<resultname= "Response"Numfound= "1340″Start= "0″><Doc><Strname= "Name">Beijing billion Degrees</Str><Strname= "Address">Shang Dian Software Park, Haidian District, Beijing</Str><Strname= "Tel">88xxxxxx1</Str></Doc><Doc><Strname= "Name">Beijing billion Degrees</Str><Strname= "Address"/><Strname= "Tel">88xxxxxx1</Str></Doc></result>
4. to search for the results of the Union, in the space between words and words or with uppercase "or" (not included).
For example: text: Haidian or text: billion degrees name: billion degrees or tel:88xxxxxx1
5. to search for intersection results, add uppercase "and" or "+" (no "sign") between words and words.
For example: text: Haidian and Billion degrees +text: Haidian +text: Billion degrees
Or
Name: Billion degrees and tel:88xxxxxx1
6. Exclude Queries
Add "-" (no number) to the word you want to exclude
For example: Haidian-billion degrees
Search results don't include the results of billions of words
7. Group Search
Use "()" to include a group
If you wish to search in the name section of the store, there are "Taipei" (not included) and "railway Station" (No "No.")
8. Increase the weight: If you want to search for "Beijing petrol station" (not including "No.") but because the return too many of the information contained in the "Chinese" (No "No.") or "gas station" (not including "number") results,
So want to have the "gas station" (not included) data to the front row, you can use the "^" (no "sign" symbol) with the increase in the number of weights,
Like "2″, you can do this:
Beijing Petrol station ^2
will also search for the results containing Beijing or gas stations, and the word gas station is weighted so the search will first judge the word in the gas station
The proportion of the search results, even if the gas station in a data more than two times there will be more priority.
Query with "^" (No "number") plus weight score after query term
For example: Billion degree and "Beijing" ^2
Or
Billion degree ^2 OR Beijing
9. Wildcard Search using "*" symbol; If you enter "China * silver" (not including "No."), the result will be China Trust Commercial Bank, China export into the bank book reading Room, China merchant Bank Securities
Chinese and silver can be sandwiched between words of any length.
Query syntax for--SOLR of enterprise search platform using SOLR