Tuesday, May 24, 2016

Apache Solr - TermsQuery

TermsQuery is essentially a list of TermQuery with a couple of extra options.
It allows you to specify a group of terms on a field and require a minimum number of matches.

Fields

  • fieldName (required here or in a parent node)
  • disableCoord (optional, default false)
  • minimumNumberShouldMatch (optional, default 0)
  • boost (optional, default 1.0)
  • Value: list of tokens (space-delimited will do it)

Example

Simply paste the following into the q= field in the Admin UI.
{!xmlparser}
<TermsQuery
 fieldName="series_t"
 disableCoord="true"
 boost="1.2"
 minimumNumberShouldMatch="2">song ice fire ender black company</TermsQuery>

1 comment:

  1. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in APACHE SOLR
    , kindly contact us http://www.maxmunus.com/contact
    MaxMunus Offer World Class Virtual Instructor led training on APACHE SOLR . We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
    For Demo Contact us:
    Name : Arunkumar U
    Email : arun@maxmunus.com
    Skype id: training_maxmunus
    Contact No.-+91-9738507310
    Company Website –http://www.maxmunus.com



    ReplyDelete