Skip to content

Documentation: Autocomplete / matcher from the browser with Opensearch #89

@eklem

Description

@eklem

So, gotten Opensearch.xml to work with the browser search box over at life-index, but need a little more to get the autocomplete to work fully.

Today the respons JSON is an array of suggested search words.
skjermbilde 2015-05-23 kl 21 52 30

From the Opensearch XML documentation for suggestions it seems I need to alter the JSON a bit. I need the existing list

[  
   "test",
   "testing",
   "tests",
   "tested",
   "test2"",
   "test2",
   "test\\tools\\bench",
   "testcase",
   "test1"",
   "testdata"
]

to look like

[  
   "test",
   [  
      "test",
      "testing",
      "tests",
      "tested",
      "test2"",
      "test2",
      "test\\tools\\bench",
      "testcase",
      "test1"",
      "testdata"
   ]
]

Where the first array consists of the query or beginsWith and then the array of suggestions. My question is if you have an idea on how easy it would be to make this a part of the existing Norch without breaking anything?

Before you do anything, I can test with some dummy-JSON to be sure this is actually working for the browser.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions