SOLR query parameters

Source: Internet
Author: User
Tags apache solr solr query

FL: A list separated by commas (,). It is used to specify the list to be returned in the document results.FieldSet. The default value is"*All fields.

Deftype: Specify query parser. Commonly Used deftype = Lucene, deftype = dismax, deftype = edismax

Q: Query.

Q. ALT: When the Q field is blank, it is used to set the default query. Generally, Q. ALT is set *:*.

QF: Query fields, which specifies the fields from which SOLR searches.

PF: Used to specify a group of fields. When the query fully matches a field specified by PF, boost is performed.

In short, PF is used to boosting phrases over words.

FQ: Filter query, excessive query.

Mm: Minimal shoshould match. SOLR supports three types of query clause: "must appear", "cannot appear", and "can appear", which correspond to and,-, or, respectively.

By default, the clause or is used. Mm is used to set the minimum number of clause that meets the condition when you use or clause. For details, see here.

PS: Phrase slop. amount of slop on phrase queries built for "pf" fields (affects boosting ). PS is about pf parameter. PS affects boosting, if you play with PS value, numfound and result set do not change. but the order of result set change. this is about the phrase query that is constructed out of the entire "Q" Param. PS is slop applied to the phrases created from the entire query for evaluating pf boosts. PS will only (potentially) change the ranked ordering of your result set, by loosening what a "phrase match" means to the PF boost.

PS example:

Lets say your query is Apache SOLR. (without quotation marks)

Lets say these three documents contains all of these words and returned.

1-) SOLR is built on the top of Apache Lucene.
2-) Apache SOLR is fast, mature and popular.
3-) SOLR is hosted under Apache umbrella.

Even if you don't use pf and PS parameters, those parameters will be in result set anyway. Lets say that they appear in this Order 1, 2, 3.

Then we include pF and PS parameter, q = Apache SOLR & pF = title ^ 1.2 & PS = 1
Second document is boosted, lets say it comes first now. the order is changed. the specified ents-that have the all query words close each other-are boosted. again the same three statements are returned.

Qs: Query phrase slop. amount of slop on phrase queries explicitly encoded in the user's query string (in QF fields; affects matching ). QS affects matching. if you play with QS, numfound changes. this parameter is about when you have explicit phrase query in your raw query. i. e. & Q = "Apache Lucene ". QS is slop applied to phrases explicitly in the & Q with double quotes. QS will (potentially) change your result set.

Tie: Tie breaker.

BQ: Boost the value of a field, for example, brand: IBM ^ 5.0.

BF: Function (with optional boosts) that will be encoded in the user's query to influence the score. any function supported natively by SOLR can be used, along with a boost value, e.g.: recip (rord (myfield), 1.5, 3) ^

WT: Writer type. The output format can be XML, JSON, PHP, or PHPs.

Q. OP: Overwrite the defaultoperator of Schema. XML ("and" or "operation logic is used when spaces exist ).
DF: The default query field.
Qt: Query type, which specifies the type to process query requests. Generally, this parameter is not required. The default value is standard.

SOLR query parameters

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: 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.