Community
How to prevent some attribute not be able to be searched in a workspace?
This is actually not a question. I tried to figure out how to prevent some attribute not to be used in elastic search in a certain workspace. This is how my colleague Eetu Tarkamo figured it out. I was in the correct path and all he had to change in my faulty codeline was "attribute.<propertyname>.keyword": "{{<wrong itemvalue>}}" to a correct value {{term}}...
```json
{
"bool": {
"must_not": [{
"term": {
"attribute.<propertyname>.keyword": "{{term}}"
}
}
],
"must": {
"query_string": {
"query": "{{term}}",
"default_operator": "AND",
"fields": [
"key^6",
"name^4",
"_all"
]
}
},
"filter": {
"bool": {
"must": [{
"bool": {
"should": [{
"term": {
"type": "<your type item>"
}
}, {
"term": {
"type": "<your another type item>"
}
}
]
}
}, {
"bool": {
"should": [{
"term": {
"owner": "{{<item>.<itemvalue>}}"
}
}, {
"terms": {
"attribute.<value>.keyword": "{{<item.propertyname>}}"
}
}
]
}
}
]
}
}
}
}
```
Now the actual question... :D If i want to select just some fields to be able to be used in the elastic search in a certain workspace, I just replace that "_all", with typing all those wanted field names that I want to be enabled in the workspace search?
Posted by Markus Kalske about 3 years ago
How to sort workspace query results
I don't fiqure out howto put workspace query that would sort all items ie. type
This kind of query works in the shortcuts, but I would like to have the workspace default search include the sort.
https://<servername>/workspace/<workspacename>/search?term=<username>&sort=type,asc
Posted by Markus Kalske about 3 years ago