yuuvis® RAD Q&A

0 votes
by (280 points)

Greetings,

we are trying to use the expertmode search to filter using multiple years, however the search cannot using the decimal field. We are tusing the search service and provide the data as json.

The current search looks like this:

{
 "term": "key_type:quote AND num_quote_jahr:2019)",
 "fields": [
    "quote.herkunft",
    "quote.jahr",
    "quote.produkt",
    "quote.ungueltig",
    "quote.marke",
    "quote.anderemarken",
    "quote.von",
    "quote.bis",
    "quote.quotenid",
    "quote.quoteprozent"
 ],
 "options": {
 "expertmode": true,
 "resolveReference": true,
 "tracktotalhits": true,
 "timezone": "+01:00"
 }
}

with

{
    "errorCode": 400,
    "message": "SearchServiceException: Failed to execute query."
}

being the return value.


Here you can see the definition of the Quote and its field jahr.

based on https://help.optimal-systems.com/yuuvisRAD/v60/user/client/de/client/searching-finding/cln_tsk_search-expert-mode.htm?Highlight=expert we expected this search to work with the "num_" prefix but it does not. How can the search be used to search for this field, with multiple values if possible?

Kind regards
Vadim

1 Answer

0 votes
by (1.1k points)

Hello Vadim,

you got ‘BAD REQUEST’(400), because there is no ‘(‘ in the term, but ‘)’ at the end of it. You don’t need the expert search in this case, because it’s a full text search. You can use our standard query:

{

"filters": {
	"quote.jahr": {
		"o": "eq",
		"v1": 2019
	}
},
"types": [
	"quote"
],
"fields": [
	"quote.herkunft",
	"quote.jahr",
	"quote.produkt",
	"quote.ungueltig",
	"quote.marke",
	"quote.anderemarken",
	"quote.von",
	"quote.bis",
	"quote.quotenid",
	"quote.quoteprozent"
],
"options": {
	"tracktotalhits": true
}

}

Kinds regards
Irina

by (280 points)
You were right regarding the closing bracket, however I am still not able to understand the working of the expert search:

when omitting the wrongly placed bracked and searching without the constraint that the "jahr" has to be a specific value then the result contains (among others)

            {
                "_index": "enaiored_0",
                "_id": "0298256657124682BE68377B12A31455",
                "_score": 5.331381,
                "_source": {
                    "quote.quotenid": "Q00990",
                    "quote.quoteprozent": 15.5499,
                    "quote.anderemarken": [
                        "Sony Ericsson"
                    ],
                    "quote.ungueltig": false,
                    "quote.herkunft": "IDC",
                    "quote.jahr": 2019.0,
                    "quote.von": "2021-03-26",
                    "id": "0298256657124682BE68377B12A31455",
                    "quote.marke": "Sony",
                    "quote.produkt": "Mobiltelefone"
                }
            },

Using the term "key_type:quote AND num_quote_jahr:2019.0" or "key_type:quote AND num_quote_jahr:2019" only yields
{
    "took": 1,
    "timed_out": false,
    "hits": {
        "max_score": "NaN",
        "total": {
            "value": 0,
            "relation": "eq"
        },
        "hits": []
    }
}
so no hits.

yes, for this specific example your standard query would suffice but what we want to achieve is a combination of this year request and the request as specified in https://qa-rad.yuuvis.com/index.php?qa=1602&qa_1=expertmode-true-search-exact-string-matching-field resulting in ultimately one request with as few as possible results so the following calculations are not done on unnecessary "quoten".

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
...