Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Roxy ignores weight setting #557

Closed
grtjn opened this issue Nov 25, 2015 · 0 comments
Closed

Roxy ignores weight setting #557

grtjn opened this issue Nov 25, 2015 · 0 comments

Comments

@grtjn
Copy link
Contributor

grtjn commented Nov 25, 2015

On behalf of Laurent Tande:

There is a bug in roxy for the weight in fields : the namespace has been forgotten so weight is ignore and it’s always set to “1.0” when doing bootstrap :
https://github.com/marklogic/roxy/blob/dev/deploy/lib/xquery/setup.xqy#L1647

It should be change to

 admin:database-field-path($path/db:path,
 ($path/db:weight,
 1.0)[1]))

(Note the db: prefix in front of weight)

I tested it with this in ml-config.xml :

      <fields>
        <field>
          <field-name>Test</field-name>
          <field-path>
            <path>/some/xpath</path>
            <weight>4</weight>
          </field-path>
          <field-path>
            <path>/some/xpath2</path>
            <weight>2</weight>
          </field-path>
          <field-path>
            <path>/some/xpath3</path>
            <weight>0.5</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>
      </fields>
RobertSzkutak added a commit to RobertSzkutak/roxy that referenced this issue Mar 15, 2016
@RobertSzkutak RobertSzkutak mentioned this issue Mar 15, 2016
dmcassel added a commit that referenced this issue Mar 16, 2016
@dmcassel dmcassel added this to the 1.7.3 milestone Mar 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants