1

私のSolrサーバーはANDのみで動作しているようですが、ORでは動作していません。

/solr/select?q=(marsden AND emma)&qt=yodl_handler works, but 
/solr/select?q=(marsden OR mackey)&qt=yodl_handler doesn't.

個々のクエリごとに、結果を返します。

/solr/select?q=marsden&qt=yodl_handler returns 2 results
/solr/select?q=mackey&qt=yodl_handler returns 3 results

どんな提案でも大歓迎です!

yodl_handler の定義は次のとおりです。

<requestHandler name="yodl_handler" class="solr.DisMaxRequestHandler">
    <lst name="defaults">
      <str name="echoParams">explicit</str>
      <float name="tie">0.01</float>
      <str name="qf">
        dc.title^1 dc3.title^1 dc.type^1 vra2.logical.creator^1 vra2.image.agent.name^1 vra2.image.agent.role^1 vra2.image.agent.role^1 vra2.image.location.name^1 vra2.image.rights.rightsholder^1 vra2.image.source.refid^1 vra2.image.title^1 vra2.image.worktype^1 vra2.work.agent.attribution^1 vra2.work.agent.name^1 vra2.work.agent.role^1 vra2.work.culturalContext^1 vra2.work.description^1 vra2.work.location-type^1 vra2.logical.location.place^1 vra2.logical.location.name^1 vra2.work.location.refid^1 vra2.work.material^1 vra2.work.rights.rightsHolder^1 vra2.work.StylePeriod^1 vra2.work.subject.term.name^1 vra2.work.subject.term.place^1 vra2.work.subject.term.keyword^1 vra2.work.technique^1 vra2.work.title^1 vra2.work.worktype^1 iris2.instrument.instrumentType^1 iris2.instrument.primaryInstrumentType^1 iris2.instrument.secondaryInstrumentType^1 iris2.instrument.instrumentType.alltypes^1 iris2.instrument.author^1 iris2.references.allauthors^1 iris2.instrument.researchArea^1 iris2.instrument.typeOfFile^1 iris2.instrument.software^1 iris2.instrument.dataType^1 iris2.instrument.linguisticTarget^1 iris2.instrument.sourceLanguage^1 iris2.instrument.funder^1 iris2.instrument.licence^1 iris2.participants.participantType^1 iris2.participants.firstLanguage^1 iris2.participants.targetLanguage^1 iris2.participants.gender^1 iris2.participants.proficiencyLearner^1 iris2.participants.proficiencyStudentsTaught^1 iris2.participants.yearsOfTeachingExperience^1 iris2.participants.domainOfUse^1 iris2.references.publicationType^1 iris2.references.author^1 iris2.references.author.lastnames^1 iris2.references.booktitle^1 iris2.references.journal^1 iris2.references.publicationDate^1 iris2.references.publicationLatestDate^1 iris2.references.publisher^1 iris2.references.placeOfPublication^1 iris2.references.editor^1 iris2.references.conferenceName^1
      </str>
      <int name="ps">100</int>
      <str name="q.alt">*:*</str>
      <str name="hl.fl">text features name</str>
      <str name="f.name.hl.fragsize">0</str>
      <str name="f.name.hl.alternateField">name</str>
      <str name="f.text.hl.fragmenter">regex</str>
    </lst>
</requestHandler>
4

1 に答える 1

1

簡単な答えは、Solr DisMax クエリ パーサーはクエリでブール論理をサポートしていないということです。「AND」を含むクエリで動作するように見えるのは、おそらく、フィールドのインデックス (ストップ ワード?) または基になるデータに表示される方法の副作用です。

debugQuery パラメーターを送信すると、内部で何が起こっているかをよりよく理解できます。たとえば、次のようになります。

/solr/select?q=(マースデンとエマ)&qt=yodl_handler&debugQuery=true

Dismax パーサーに関する Solr wiki には、さらに詳しいドキュメントがあります。

Dismax クエリ パーサーは、Lucene QueryParser 構文の非常に単純化されたサブセットをサポートします。引用符はフレーズをグループ化するために使用でき、+/- は必須句とオプション句を示すために使用できます...ただし、他のすべての Lucene クエリ パーサーの特殊文字は、ユーザー エクスペリエンスを簡素化するためにエスケープされます。( DisMaxQParserPluginを参照)

幸いなことに、Solr の最新バージョン (3.1 以降) を使用している場合は、新しいExtendedDisMaxパーサーにアクセスできます。これは、ブール クエリをサポートしています。`

于 2012-09-19T16:17:08.550 に答える