0

Windows 8 を使用しており、BitNami インストーラーを使用して apache solr (バージョン 4.4.0) をインストールしました。drupal7 サイトに「search api」モジュールと「search api solr」モジュールをインストールしてから、solr サーバーをモジュールに追加し、問題は、デフォルトの「デフォルト ノード インデックス」インデックスを使用してサイトのインデックスを作成しようとすると、「項目をインデックスに登録できませんでした。詳細についてはログを確認してください」というメッセージが表示されることです。

検索 api solr モジュールの「search_api_solr\solr-conf\4.x」フォルダー内のファイルを「C:\solr\apache-solr\solr\collection1\conf」に置き換えました。

drupal ログ メッセージは次のとおりです。

インデックス作成中の SearchApiException: "400" ステータス: Bad Request: Bad Request{"responseHeader":{"status":400,"QTime":1},"error":{"msg":"ERROR: [doc=default_node_index- 1] SearchApiSolrConnection->checkResponse() の不明なフィールド 'index_id'","code":400}} (C:\wamp1\www\testak\sites\all\modules\search_api_solr\includes\solr_connection.inc の 548 行目) .

私のsolrログには次のものがあります:

org.apache.solr.common.SolrException: エラー: [doc=default_node_index-1] 不明なフィールド 'index_id'

私は何を逃したのかわからない

これは私のシーマです:

<?xml version="1.0" encoding="UTF-8" ?>

<!--
 This is the Solr schema file. This file should be named "schema.xml" and
 should be in the conf directory under the solr home
 (i.e. ./solr/conf/schema.xml by default)
 or located where the classloader for the Solr webapp can find it.

 For more information, on how to customize this file, please see
 http://wiki.apache.org/solr/SchemaXml
-->

<schema name="drupal-4.1-solr-4.x" version="1.3">

  <types>

    <fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/>
    <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="true"/>
    <fieldtype name="binary" class="solr.BinaryField"/>
    <fieldType name="integer" class="solr.TrieIntField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
    <fieldType name="float" class="solr.TrieFloatField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
    <fieldType name="long" class="solr.TrieLongField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
    <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
    <fieldType name="sint" class="solr.TrieIntField" sortMissingLast="true" omitNorms="true"/>
    <fieldType name="slong" class="solr.TrieFloatField" sortMissingLast="true" omitNorms="true"/>
    <fieldType name="sfloat" class="solr.TrieLongField" sortMissingLast="true" omitNorms="true"/>
    <fieldType name="sdouble" class="solr.TrieDoubleField" sortMissingLast="true" omitNorms="true"/>
    <fieldType name="tint" class="solr.TrieIntField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
    <fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
    <fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
    <fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
    <fieldType name="pfloat" class="solr.FloatField" omitNorms="true"/>
    <fieldType name="file" keyField="id" defVal="1" stored="false" indexed="false" class="solr.ExternalFileField" valType="pfloat"/>
    <fieldType name="date" class="solr.DateField" sortMissingLast="true" omitNorms="true"/>
    <fieldType name="tdate" class="solr.TrieDateField" omitNorms="true" precisionStep="6" positionIncrementGap="0"/>
    <fieldType name="text_ws" class="solr.TextField" omitNorms="true" positionIncrementGap="100">
      <analyzer>
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>
      </analyzer>
    </fieldType>
    <fieldType name="text" class="solr.TextField" positionIncrementGap="100">
      <analyzer type="index">
        <charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.StopFilterFactory"
                ignoreCase="true"
                words="stopwords.txt"
                enablePositionIncrements="true"
                />
        <filter class="solr.WordDelimiterFilterFactory"
                protected="protwords.txt"
                generateWordParts="1"
                generateNumberParts="1"
                catenateWords="1"
                catenateNumbers="1"
                catenateAll="0"
                splitOnCaseChange="1"
                preserveOriginal="1"/>
        <filter class="solr.LengthFilterFactory" min="2" max="100" />
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/>
        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
      </analyzer>
      <analyzer type="query">
        <charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
        <filter class="solr.StopFilterFactory"
                ignoreCase="true"
                words="stopwords.txt"
                enablePositionIncrements="true"
                />
        <filter class="solr.WordDelimiterFilterFactory"
                protected="protwords.txt"
                generateWordParts="1"
                generateNumberParts="1"
                catenateWords="0"
                catenateNumbers="0"
                catenateAll="0"
                splitOnCaseChange="1"
                preserveOriginal="1"/>
        <filter class="solr.LengthFilterFactory" min="2" max="100" />
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/>
        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
      </analyzer>
    </fieldType>
    <fieldType name="text_und" class="solr.TextField" positionIncrementGap="100">
      <analyzer type="index">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
        <filter class="solr.WordDelimiterFilterFactory"
                protected="protwords.txt"
                generateWordParts="1"
                generateNumberParts="1"
                catenateWords="1"
                catenateNumbers="1"
                catenateAll="0"
                splitOnCaseChange="0"/>
        <filter class="solr.LengthFilterFactory" min="2" max="100" />
        <filter class="solr.LowerCaseFilterFactory"/>
      </analyzer>
      <analyzer type="query">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
        <filter class="solr.StopFilterFactory"
                ignoreCase="true"
                words="stopwords.txt"
                enablePositionIncrements="true"
                />
        <filter class="solr.WordDelimiterFilterFactory"
                protected="protwords.txt"
                generateWordParts="1"
                generateNumberParts="1"
                catenateWords="0"
                catenateNumbers="0"
                catenateAll="0"
                splitOnCaseChange="0"/>
        <filter class="solr.LengthFilterFactory" min="2" max="100" />
        <filter class="solr.LowerCaseFilterFactory"/>
      </analyzer>
    </fieldType>
    <fieldType name="edge_n2_kw_text" class="solr.TextField" omitNorms="true" positionIncrementGap="100">
      <analyzer type="index">
        <tokenizer class="solr.KeywordTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="25" />
      </analyzer>
      <analyzer type="query">
        <tokenizer class="solr.KeywordTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>
      </analyzer>
    </fieldType>
    <fieldType name="textSpell" class="solr.TextField" positionIncrementGap="100">
      <analyzer>
        <tokenizer class="solr.StandardTokenizerFactory" />
        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
        <filter class="solr.LengthFilterFactory" min="4" max="20" />
        <filter class="solr.LowerCaseFilterFactory" />
        <filter class="solr.RemoveDuplicatesTokenFilterFactory" />
      </analyzer>
    </fieldType>
    <fieldType name="sortString" class="solr.TextField" sortMissingLast="true" omitNorms="true">
      <analyzer>
        <tokenizer class="solr.KeywordTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory" />
        <filter class="solr.TrimFilterFactory" />
        -->
      </analyzer>
    </fieldType>
    <fieldType name="rand" class="solr.RandomSortField" indexed="true" />
    <fieldtype name="ignored" stored="false" indexed="false" class="solr.StrField" />
    <fieldType name="point" class="solr.PointType" dimension="2" subFieldType="tdouble"/>
    <fieldType name="location" class="solr.LatLonType" subFieldType="tdouble"/>
    <fieldtype name="geohash" class="solr.GeoHashField"/>
  </types>

  <xi:include href="schema_extra_types.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
    <xi:fallback></xi:fallback>
  </xi:include>

  <fields>
    <field name="id" type="string" indexed="true" stored="true" required="true" />
    <field name="item_id"  type="string" indexed="true" stored="true" />
<field name="index_id" type="string" indexed="true" stored="true" />
    <copyField source="item_id" dest="sort_search_api_id" />
    <field name="entity_id"  type="long" indexed="true" stored="true" />
    <field name="entity_type" type="string" indexed="true" stored="true" />
    <field name="bundle" type="string" indexed="true" stored="true"/>
    <field name="bundle_name" type="string" indexed="true" stored="true"/>
    <field name="site" type="string" indexed="true" stored="true"/>
    <field name="hash" type="string" indexed="true" stored="true"/>
    <field name="url" type="string" indexed="true" stored="true"/>
    <field name="label" type="text" indexed="true" stored="true" termVectors="true" omitNorms="true"/>
    <copyField source="label" dest="sort_label"/>

    <field name="content" type="text" indexed="true" stored="true" termVectors="true"/>
    <field name="teaser" type="text" indexed="false" stored="true"/>
    <field name="path" type="string" indexed="true" stored="true"/>
    <field name="path_alias" type="text" indexed="true" stored="true" termVectors="true" omitNorms="true"/>
    <field name="tid"  type="long" indexed="true" stored="true" multiValued="true"/>
    <field name="taxonomy_names" type="text" indexed="true" stored="false" termVectors="true" multiValued="true" omitNorms="true"/>
    <copyField source="tm_vid_*" dest="taxonomy_names"/>
    <field name="timestamp" type="tdate" indexed="true" stored="true" default="NOW" multiValued="false"/>
    <field name="spell" type="textSpell" indexed="true" stored="true" multiValued="true"/>
    <copyField source="label" dest="spell"/>
    <copyField source="content" dest="spell"/>

    <copyField source="ts_*" dest="spell"/>
    <copyField source="tm_*" dest="spell"/>
    <dynamicField name="tags_*" type="text"   indexed="true" stored="false" omitNorms="true"/>

    <dynamicField name="is_*"  type="long"    indexed="true"  stored="true" multiValued="false"/>
    <dynamicField name="im_*"  type="long"    indexed="true"  stored="true" multiValued="true"/>
    <dynamicField name="fs_*"  type="float"   indexed="true"  stored="true" multiValued="false"/>
    <dynamicField name="fm_*"  type="float"   indexed="true"  stored="true" multiValued="true"/>
    <dynamicField name="ps_*"  type="double"   indexed="true"  stored="true" multiValued="false"/>
    <dynamicField name="pm_*"  type="double"   indexed="true"  stored="true" multiValued="true"/>
    <dynamicField name="bm_*"  type="boolean" indexed="true"  stored="true" multiValued="true"/>
    <dynamicField name="bs_*"  type="boolean" indexed="true"  stored="true" multiValued="false"/>
    <dynamicField name="ss_*"  type="string"  indexed="true"  stored="true" multiValued="false"/>
    <dynamicField name="sm_*"  type="string"  indexed="true"  stored="true" multiValued="true"/>
    <dynamicField name="ts_*"  type="text"    indexed="true"  stored="true" multiValued="false" termVectors="true"/>
    <dynamicField name="tm_*"  type="text"    indexed="true"  stored="true" multiValued="true" termVectors="true"/>
    <dynamicField name="tus_*" type="text_und" indexed="true"  stored="true" multiValued="false" termVectors="true"/>
    <dynamicField name="tum_*" type="text_und" indexed="true"  stored="true" multiValued="true" termVectors="true"/>
    <dynamicField name="tos_*" type="text"    indexed="true"  stored="true" multiValued="false" termVectors="true" omitNorms="true"/>
    <dynamicField name="tom_*" type="text"    indexed="true"  stored="true" multiValued="true" termVectors="true" omitNorms="true"/>
    <dynamicField name="tes_*" type="edge_n2_kw_text" indexed="true" stored="true" multiValued="false" omitTermFreqAndPositions="true" />
    <dynamicField name="tem_*" type="edge_n2_kw_text" indexed="true" stored="true" multiValued="true" omitTermFreqAndPositions="true" />
    <dynamicField name="tws_*" type="text_ws" indexed="true" stored="true" multiValued="false"/>
    <dynamicField name="twm_*" type="text_ws" indexed="true" stored="true" multiValued="true"/>

    <dynamicField name="ds_*"  type="tdate"   indexed="true"  stored="true" multiValued="false"/>
    <dynamicField name="dm_*"  type="tdate"   indexed="true"  stored="true" multiValued="true"/>
    <dynamicField name="its_*" type="tlong"   indexed="true"  stored="true" multiValued="false"/>
    <dynamicField name="itm_*" type="tlong"   indexed="true"  stored="true" multiValued="true"/>
    <dynamicField name="fts_*" type="tfloat"  indexed="true"  stored="true" multiValued="false"/>
    <dynamicField name="ftm_*" type="tfloat"  indexed="true"  stored="true" multiValued="true"/>
    <dynamicField name="pts_*" type="tdouble" indexed="true"  stored="true" multiValued="false"/>
    <dynamicField name="ptm_*" type="tdouble" indexed="true"  stored="true" multiValued="true"/>

    <dynamicField name="xs_*"  type="binary"  indexed="false" stored="true" multiValued="false"/>
    <dynamicField name="xm_*"  type="binary"  indexed="false" stored="true" multiValued="true"/>
    <dynamicField name="dds_*" type="date"    indexed="true"  stored="true" multiValued="false"/>
    <dynamicField name="ddm_*" type="date"    indexed="true"  stored="true" multiValued="true"/>

    <dynamicField name="iss_*" type="slong"   indexed="true"  stored="true" multiValued="false"/>
    <dynamicField name="ism_*" type="slong"   indexed="true"  stored="true" multiValued="true"/>
    <dynamicField name="fss_*" type="sfloat"  indexed="true"  stored="true" multiValued="false"/>
    <dynamicField name="fsm_*" type="sfloat"  indexed="true"  stored="true" multiValued="true"/>
    <dynamicField name="pss_*" type="sdouble" indexed="true"  stored="true" multiValued="false"/>
    <dynamicField name="psm_*" type="sdouble" indexed="true"  stored="true" multiValued="true"/>
    <dynamicField name="hs_*" type="integer" indexed="true"  stored="true" multiValued="false"/>
    <dynamicField name="hm_*" type="integer" indexed="true"  stored="true" multiValued="true"/>
    <dynamicField name="hss_*" type="sint"   indexed="true"  stored="true" multiValued="false"/>
    <dynamicField name="hsm_*" type="sint"   indexed="true"  stored="true" multiValued="true"/>
    <dynamicField name="hts_*" type="tint"   indexed="true"  stored="true" multiValued="false"/>
    <dynamicField name="htm_*" type="tint"   indexed="true"  stored="true" multiValued="true"/>

    <dynamicField name="zs_*" type="string"   indexed="false"  stored="true" multiValued="false"/>
    <dynamicField name="zm_*" type="string"   indexed="false"  stored="true" multiValued="true"/>
    <dynamicField name="points_*" type="point" indexed="true"  stored="true" multiValued="false"/>
    <dynamicField name="pointm_*" type="point" indexed="true"  stored="true" multiValued="true"/>
    <dynamicField name="locs_*" type="location" indexed="true"  stored="true" multiValued="false"/>
    <dynamicField name="locm_*" type="location" indexed="true"  stored="true" multiValued="true"/>
    <dynamicField name="geos_*" type="geohash" indexed="true"  stored="true" multiValued="false"/>
    <dynamicField name="geom_*" type="geohash" indexed="true"  stored="true" multiValued="true"/>

    <dynamicField name="eff_*" type="file"/>

    <dynamicField name="sort_*" type="sortString" indexed="true" stored="false"/>
    <copyField source="ss_*" dest="sort_*"/>
    <dynamicField name="random_*" type="rand" indexed="true" stored="true"/>

  </fields>

  <xi:include href="schema_extra_fields.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
    <xi:fallback></xi:fallback>
  </xi:include>

  <uniqueKey>id</uniqueKey>

  <defaultSearchField>content</defaultSearchField>

  <solrQueryParser defaultOperator="AND"/>

</schema>
4

1 に答える 1

1

Apache solr は適切に構成されましたが、インストールしたモジュールが問題に直面していましたが、Search API と Search api Solr モジュールを再インストールしたところ問題は解決しました。

于 2013-09-17T05:33:17.823 に答える