Liking cljdoc? Tell your friends :D

corona.query


boost-termsclj

(boost-terms mlt-terms mlt-qf & [mlt-boost-factor])
source

build-internal-mlt-settingsclj

(build-internal-mlt-settings settings)

NOTE: :fl is not considered to get back all keys of matching doc.

NOTE: :fl is not considered to get back all keys of matching doc.
sourceraw docstring

default-term-vectors-settingsclj

source

format-paramclj

(format-param p)
source

format-paramsclj

(format-params m)
source

format-valuesclj

(format-values v)
source

mlt-keysclj

source

mlt-resp->raw-termsclj

(mlt-resp->raw-terms mlt-resp mlt-qf-raw)
source

mlt-resp->termsclj

(mlt-resp->terms mlt-resp)
source

mlt-terms->qclj

(mlt-terms->q mlt-q mlt-terms & [q])
source

queryclj

(query client-config settings)

Makes and executes solr query from setting map Uses solr /select route. Returns decoded response of solr service.

Makes and executes solr query from setting map
Uses solr /select route.
Returns decoded response of solr service.
sourceraw docstring

query-handlerclj

(query-handler client-config handler settings)
source

query-mltclj

(query-mlt client-config settings)

A MoreLikeThis query that uses MLT request handler (/mlt route) to give back similar results to a matching document identified in the query under :q (e.g. {:q id:12345}.)

From the specified document, MLT handler will build a query behind the scenes, by searching for 'interesting terms' from fields specified under :fl key.

PriorityQueue is used to fetch the scores for all the terms, which are then added as boost queries to a large set of terms in a boolean query, where each term is set to SHOULD occur. That way the terms are boosted based on MLT semantics, while it uses the ClassicSimilarity behind the scenes.

These values will be used to build the boost term queries: tq = new BoostQuery(tq, boostFactor * myScore / bestScore); e.g. Queue = Term1:100 , Term2:50, Term3:20, Term4:10 => Term1:10 , Term2:5, Term3:2, Term4:1

settings map:

:q <string> default: ":" (everything) Query terms

:fq Filter query, this does not affect the search, only what gets returned

:mlt.fl <string>, default: "contents" The fields to use for similarity. NOTE: if possible use stored TermVectors in the managedschema file for fields (e.g. <field name="cat" ... termVectors="true" />) If termVectors are not stored, MoreLikeThis will generate terms from stored fields.

:mlt.mintf <int>, default: 2 Minimum Term Frequency - the frequency below which terms will be ignored in the source doc. NOTE: Getting good MLT results require some fine-tuning based on experimentation, in particular mlt.mintf. Start low and slowly increase until you start getting results that "feel right".

:mlt.mindf <int>, default: 5 Minimum Document Frequency - the frequency at which words will be ignored which do not occur in at least this many docs.

:mlt.minwl <int>, default: 0 Minimum word length below which words will be ignored.

:mlt.maxwl <int>, default: 0 Maximum word length above which words will be ignored.

:mlt.maxqt <int>, default: 25 Maximum number of query terms that will be included in any generated query.

:mlt.maxntp <int>, default: 5000 Maximum number of tokens to parse in each example doc field that is not stored with TermVector support.

:mlt.boost <bool>, default: false [true/false] set if the query will be boosted by the interesting term relevance.

:mlt.qf Query fields and their boosts using the same format as that used in DisMaxQParserPlugin. These fields must also be specified in mlt.fl.

:mlt.match.include <bool>, default: true Specifies whether or not the response should include the matched document under :match key.

:mlt.match.offset Specifies an offset into the main query search results to locate the document on which the MoreLikeThis query should operate. By default, the query operates on the first result for the q parameter.

:mlt.interestingTerms <["list", "none", "details"]> Controls how the MoreLikeThis component presents the "interesting" terms (the top TF/IDF terms) for the query. Supports three values.

  • "list" : lists the terms.
  • "none" : lists no terms.
  • "details": lists the terms along with the boost value used for each term. Unless mlt.boost=true, all terms will have boost=1.0.

:fl Fields to return. We force 'id' to be returned so that there is a unique identifier with each record.

:wt <enum>, default: "json" Data type returned.

:start <int>, default: 0 Record to start at

:rows <int>, default: 10 Number of records to return.

A MoreLikeThis query that uses MLT request handler (/mlt route) to give back
similar results to a matching document identified in the query under :q
(e.g. {:q id:12345}.)

From the specified document, MLT handler will build a query behind the scenes,
by searching for 'interesting terms' from fields specified under :fl key.

PriorityQueue is used to fetch the scores for all the terms, which are then
added as boost queries to a large set of terms in a boolean query, where each
term is set to SHOULD occur. That way the terms are boosted based on MLT
semantics, while it uses the ClassicSimilarity behind the scenes.

These values will be used to build the boost term queries:
tq = new BoostQuery(tq, boostFactor * myScore / bestScore); 
 e.g. Queue = Term1:100 , Term2:50, Term3:20, Term4:10 
 => Term1:10 , Term2:5, Term3:2, Term4:1 

settings map:

:q <string> default: "*:*" (everything)
Query terms

:fq
Filter query, this does not affect the search, only what gets returned

:mlt.fl <string>, default: "contents"
The fields to use for similarity. 
NOTE: if possible use stored TermVectors in the managedschema file for fields
(e.g. <field name="cat" ... termVectors="true" />)
If termVectors are not stored, MoreLikeThis will generate terms from stored fields.

:mlt.mintf <int>, default: 2
Minimum Term Frequency - the frequency below which terms will be
ignored in the source doc. 
NOTE: Getting good MLT results require some fine-tuning based on experimentation,
in particular mlt.mintf. Start low and slowly increase until you start getting
results that "feel right".

:mlt.mindf <int>, default: 5
Minimum Document Frequency - the frequency at which words will be
ignored which do not occur in at least this many docs.

:mlt.minwl <int>, default: 0
Minimum word length below which words will be ignored.

:mlt.maxwl <int>, default: 0
Maximum word length above which words will be ignored.

:mlt.maxqt <int>, default: 25
Maximum number of query terms that will be included in any generated query.

:mlt.maxntp <int>, default: 5000
Maximum number of tokens to parse in each example doc field that is not stored
with TermVector support.

:mlt.boost <bool>, default: false
[true/false] set if the query will be boosted by the interesting term relevance.

:mlt.qf
Query fields and their boosts using the same format as that used in
DisMaxQParserPlugin. These fields must also be specified in mlt.fl.

:mlt.match.include <bool>, default: true
Specifies whether or not the response should include the matched document
under :match key.

:mlt.match.offset
Specifies an offset into the main query search results to locate the document
on which the MoreLikeThis query should operate. By default, the query operates
on the first result for the q parameter.

:mlt.interestingTerms <["list", "none", "details"]>
Controls how the MoreLikeThis component presents the "interesting" terms
(the top TF/IDF terms) for the query. Supports three values.
- "list" : lists the terms.
- "none" : lists no terms.
- "details": lists the terms along with the boost value used for each term.
Unless mlt.boost=true, all terms will have boost=1.0.

:fl
Fields to return. We force 'id' to be returned so that there is a unique
identifier with each record.

:wt <enum>, default: "json"
Data type returned.

:start <int>, default: 0
Record to start at

:rows <int>, default: 10
Number of records to return.
sourceraw docstring

query-mlt-tv-edismaxclj

(query-mlt-tv-edismax client-config settings)

Like more like this handler query or query-mlt but

Special settings:

:mlt.q <string> To reach the matching document to get interesting terms.

Supported mlt keys: :mlt-fl, :mlt-qf

IMPORTANT: All mlt.fl fields MUST be set as TermVectors=true in the managedschema for the mlt query to be integrated to main q.

Like more like this handler query or `query-mlt` but

- takes top-k terms *PER FIELD*, for more explanations, see
  https://github.com/DiceTechJobs/RelevancyFeedback#isnt-this-just-the-mlt-handler

- allows edismax params (e.g. `:boost` `:bf` `:bq` `:qf`)
  NOTE: To better understand boosting methods, see
  https://nolanlawson.com/2012/06/02/comparing-boost-methods-in-solr/

Special settings:

:mlt.q <string>
To reach the matching document to get interesting terms.

Supported mlt keys: :mlt-fl, :mlt-qf

IMPORTANT: All mlt.fl fields MUST be set as TermVectors=true in the managedschema
for the mlt query to be integrated to main q.
sourceraw docstring

query-term-vectorsclj

(query-term-vectors client-config settings)
source

term-vectors-resp->interesting-terms-per-fieldclj

(term-vectors-resp->interesting-terms-per-field tv-resp & [qf top-k])

Digests the response from tvrh handler call targetting matching doc id.

Digests the response from tvrh handler call targetting matching doc id.
sourceraw docstring

terms->qclj

(terms->q terms)
sourceraw docstring

terms-per-field->qclj

(terms-per-field->q terms-map)
source

tv-terms->qclj

(tv-terms->q tv-terms & [q])
source

vectorize-qf-elementclj

(vectorize-qf-element qf-element)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close