Closed rajib-cts closed 5 years ago
Can you share the relevant part of your ml-config.xml?
<fields>
<field>
<field-name>suggest-field-project</field-name>
<field-path>
<path>mml:project/mml:feed/mml:title</path>
<weight>1.0</weight>
<path>mml:project/mml:feed/mml:author</path>
<weight>1.0</weight>
<path>mml:project/mml:feed/mml:isbn</path>
<weight>1.0</weight>
</field-path>
<word-lexicons/>
<included-elements/>
<excluded-elements/>
<tokenizer-overrides/>
<stemmed-searches>basic</stemmed-searches>
<fast-phrase-searches>true</fast-phrase-searches>
<fast-case-sensitive-searches>true</fast-case-sensitive-searches>
<fast-diacritic-sensitive-searches>true</fast-diacritic-sensitive-searches>
</field>
<field>
<field-name>suggest-field-content</field-name>
<field-path>
<path>mml:content/mml:feed/mml:descriptive/mml:title</path>
<weight>1.0</weight>
<path>mml:content/mml:feed/mml:contentType</path>
<weight>1.0</weight>
</field-path>
<word-lexicons/>
<included-elements/>
<excluded-elements/>
<tokenizer-overrides/>
<stemmed-searches>basic</stemmed-searches>
<fast-phrase-searches>true</fast-phrase-searches>
<fast-case-sensitive-searches>true</fast-case-sensitive-searches>
<fast-diacritic-sensitive-searches>true</fast-diacritic-sensitive-searches>
</field>
<field>
<field-name>suggest-field-all</field-name>
<field-path>
<path>mml:project/mml:feed/mml:title</path>
<weight>1.0</weight>
<path>mml:project/mml:feed/mml:author</path>
<weight>1.0</weight>
<path>mml:project/mml:feed/mml:isbn</path>
<weight>1.0</weight>
<path>mml:content/mml:feed/mml:descriptive/mml:title</path>
<weight>1.0</weight>
<path>mml:content/mml:feed/mml:contentType</path>
<weight>1.0</weight>
</field-path>
<word-lexicons/>
<included-elements/>
<excluded-elements/>
<tokenizer-overrides/>
<stemmed-searches>basic</stemmed-searches>
<fast-phrase-searches>true</fast-phrase-searches>
<fast-case-sensitive-searches>true</fast-case-sensitive-searches>
<fast-diacritic-sensitive-searches>true</fast-diacritic-sensitive-searches>
</field>
<field>
<field-name/>
<include-root>true</include-root>
<fast-case-sensitive-searches>false</fast-case-sensitive-searches>
<fast-diacritic-sensitive-searches>false</fast-diacritic-sensitive-searches>
<fast-phrase-searches>false</fast-phrase-searches>
<one-character-searches>false</one-character-searches>
<stemmed-searches>basic</stemmed-searches>
<three-character-searches>false</three-character-searches>
<three-character-word-positions>false</three-character-word-positions>
<trailing-wildcard-searches>false</trailing-wildcard-searches>
<trailing-wildcard-word-positions>false</trailing-wildcard-word-positions>
<two-character-searches>false</two-character-searches>
<value-positions>false</value-positions>
<value-searches>false</value-searches>
<word-searches>false</word-searches>
<word-lexicons/>
<included-elements>
<included-element>
<namespace-uri>http://ns.com</namespace-uri>
<localname>blah</localname>
<weight>1.0</weight>
<attribute-namespace-uri/>
<attribute-localname/>
<attribute-value/>
</included-element>
</included-elements>
<excluded-elements/>
</field>
</fields>
<range-element-indexes>
<range-field-index>
<scalar-type>string</scalar-type>
<field-name>suggest-field-project</field-name>
<collation>http://marklogic.com/collation/</collation>
<range-value-positions>false</range-value-positions>
<invalid-values>ignore</invalid-values>
</range-field-index>
<range-field-index>
<scalar-type>string</scalar-type>
<field-name>suggest-field-content</field-name>
<collation>http://marklogic.com/collation/</collation>
<range-value-positions>false</range-value-positions>
<invalid-values>ignore</invalid-values>
</range-field-index>
<range-field-index>
<scalar-type>string</scalar-type>
<field-name>suggest-field-all</field-name>
<collation>http://marklogic.com/collation/</collation>
<range-value-positions>false</range-value-positions>
<invalid-values>ignore</invalid-values>
</range-field-index>
You have to wrap each combination of a path and weight element into separate field-path element, and not group them all together in one..
Thanks @grtjn, Its working fine now.
After adding one field name and path in ml-config.xml I am getting below error like
Bootstrapping your project into MarkLogic 9 on 10.11.101.122... WARN: Running the hybrid app-type with MarkLogic 8 is not recommended. Doing so requires manual patching of the Roxy rewriter. You will be unable to access all of the MarkLogic REST features. See https://github.com/marklogic/roxy/issues/416 for details. ERROR: XDMP-AS: (err:XPTY0004) $field-path as xs:string -- Invalid coercion: (<d b:path xmlns:db="http://marklogic.com/xdmp/database">mml:project...</db:path>, < db:path xmlns:db="http://marklogic.com/xdmp/database">mml:project...</db:path>,