Skip to content

Conversation

@mickeyn
Copy link
Contributor

@mickeyn mickeyn commented May 20, 2016

This fix will change the 'documentation' mapping from:

    "documentation" : {
          "type" : "string"
    }

to:

    "documentation" : {
        "fields" : {
           "camelcase" : {
              "store" : true,
              "analyzer" : "camelcase",
              "type" : "string"
           },
           "lowercase" : {
              "analyzer" : "lowercase",
              "type" : "string",
              "store" : true
           },
           "edge" : {
              "analyzer" : "edge",
              "type" : "string",
              "store" : true
           },
           "analyzed" : {
              "analyzer" : "standard",
              "type" : "string",
              "fielddata" : {
                 "format" : "disabled"
              },
              "store" : true
           },
           "edge_camelcase" : {
              "store" : true,
              "type" : "string",
              "analyzer" : "edge_camelcase"
           }
        },
        "ignore_above" : 2048,
        "index" : "not_analyzed",
        "type" : "string"
     }

This change will also restore the original behavior of autocomplete
and fix the test t/server/controller/search/autocomplete.t
It is also needed to fix a test in the metacpan-web repo.

@mickeyn
Copy link
Contributor Author

mickeyn commented May 20, 2016

related to: metacpan/metacpan-web#1695

@mickeyn
Copy link
Contributor Author

mickeyn commented May 20, 2016

as we found while investigating this in the QAH, that's how the mapping is determined. see the example of abstract attribute.
I added a comment to the remark in the code so it's clearer.

This fix will change the 'documentation' mapping from:

    "documentation" : {
          "type" : "string"
    }

to:
    "documentation" : {
        "fields" : {
           "camelcase" : {
              "store" : true,
              "analyzer" : "camelcase",
              "type" : "string"
           },
           "lowercase" : {
              "analyzer" : "lowercase",
              "type" : "string",
              "store" : true
           },
           "edge" : {
              "analyzer" : "edge",
              "type" : "string",
              "store" : true
           },
           "analyzed" : {
              "analyzer" : "standard",
              "type" : "string",
              "fielddata" : {
                 "format" : "disabled"
              },
              "store" : true
           },
           "edge_camelcase" : {
              "store" : true,
              "type" : "string",
              "analyzer" : "edge_camelcase"
           }
        },
        "ignore_above" : 2048,
        "index" : "not_analyzed",
        "type" : "string"
     }

This change will also restore the original behavior of `autocomplete`
and fix the test t/server/controller/search/autocomplete.t
It is also needed to fix a test in the metacpan-web repo.
@mickeyn mickeyn force-pushed the mickey/fix_documentation_mapping branch from c6d204d to 3350fe3 Compare May 20, 2016 17:51
@oalders oalders merged commit 3a5c168 into mi/es2 May 20, 2016
@oalders oalders deleted the mickey/fix_documentation_mapping branch May 20, 2016 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants