Skip to content

Commit

Permalink
TASK: Remove wrong result example
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellienert authored May 31, 2020
1 parent 77394c4 commit 4801237
Showing 1 changed file with 0 additions and 82 deletions.
82 changes: 0 additions & 82 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,88 +111,6 @@ In case you need to build the URI to the suggest controller yourself, this is wh

{f:uri.action(action: 'index', controller: 'Suggest', package: 'Flowpack.SearchPlugin', format: 'json', absolute: 1, arguments: {contextNodeIdentifier: node.identifier, dimensionCombination: dimensionCombination})}

The returned JSON looks like this (with a `term` of "content" after indexing the Neos demo site):

{
"completions": [
"content",
"content element",
"content in",
"content in neos",
"content in neos because",
"content in neos because you",
"content repository"
],
"suggestions": [
{
"text": "995c9174-ddd6-4d5c-cfc0-1ffc82184677",
"_index": "acmecom-1536833562",
"_type": "Neos-Neos:Page",
"_id": "03da089f6495852dc9e7b796adde85f21093b3c7",
"score": 40,
"payload": {
"__path": "/sites/acmecom/node-2"
},
"contexts": {
"workspace": {
0: "live"
},
"parentPath": {
0: "/sites/acmecom"
},
"dimensionCombinationHash": {
0: "d751713988987e9331980363e24189ce"
},
}
},
{
"text": "a66ec7db-3459-b67b-7bcb-16e2508a89f0",
"_index": "acmecom-1536833562",
"_type": "Neos-Neos:Page",
"_id": "151a1d0531f1ac5c1a267a3d6a3af84967e0c35f",
"score": 20,
"payload": {
"__path": "/sites/acmecom/node-1"
},
"contexts": {
"workspace": {
0: "live"
},
"parentPath": {
0: "/sites/acmecom"
},
"dimensionCombinationHash": {
0: "d751713988987e9331980363e24189ce"
},
}
},
{
"text": "a3474e1d-dd60-4a84-82b1-18d2f21891a3",
"_index": "acmecom-1536833562",
"_id": "c443d53c76de1af2438b8af0bf33dc7befe291f5",
"_type": "Neos-Neos:Page",
"score": 20,
"_source": {
"__path": "/sites/acmecom/node-3"
},
"contexts": {
"workspace": {
0: "live"
},
"parentPath": {
0: "/sites/acmecom"
},
"dimensionCombinationHash": {
0: "d751713988987e9331980363e24189ce"
},
}
}
]
}

The `completions` can be used to suggest search terms to the user. The `suggestions` contains
"top search results" for the given term, the document they refer to is given in the `payload`.

## AJAX search

The plugin comes with a controller that can be reached like this per default, using `GET`:
Expand Down

0 comments on commit 4801237

Please sign in to comment.