• 首页
  • vue
  • TypeScript
  • JavaScript
  • scss
  • css3
  • html5
  • php
  • MySQL
  • redis
  • jQuery
  • SolrDisMaxQuery::setQueryPhraseSlop()

    (No version information available, might only be in Git)

    Specifies the amount of slop permitted on phrase queries explicitly included in the user's query string(qf parameter)

    说明

    publicSolrDisMaxQuery::setQueryPhraseSlop(string $slop): SolrDisMaxQuery

    The Query Phrase Slop is the amount of slop permitted on phrase queries explicitly included in the user's query string with theqfparameter.

    slop refers to the number of positions one token needs to be moved in relation to another token in order to match a phrase specified in a query.

    参数

    $slop

    Amount of slop

    返回值

    SolrDisMaxQuery

    范例

    Example #1 SolrDisMaxQuery::setQueryPhraseSlop() example

    <?php
    $dismaxQuery = new SolrDisMaxQuery();
    $dismaxQuery->setQueryPhraseSlop(3);
    echo $dismaxQuery;
    ?>
    

    以上例程的输出类似于:

    defType=edismax&qs=3