I'm using the prismic API, and I'm usin Predicate function to search the API. When we combine several Predicate, it searches with the "AND" clause, while I would like to have "OR". If the API doesn't offer it, how can I search by filter ?
Unfortunately the Prismic API doesn't support "OR" operations like this.
Some cases can be handled by using the "any" Predicate:
https://prismic.io/docs/laravel/query-the-api/query-predicates-reference#31_0-any
But most of the time you'll need to run multiple queries and handle the logic in your website application.
Related
I am currently working on an integration that involves filtering persons based on multiple fields and multiple values per field, through the API.
As far as I know, it is not possible to implement the following type of filter using the API:
Custom Field A with an "OR" operator between the options: option-1 OR option-2 OR option-3
"AND"
Custom Field B with an "OR" operator between the options: option-4 OR option-5 OR option-6
"AND"
Custom Field C with an "OR" operator between the options: option-7 OR option-8 OR option-9
Could you kindly confirm if this type of filter is not supported by the API?
Thank you.
Using Laravel TNTSearch how can I define different cases for keywords to end up with the same result on query.
Having the following keyword Softwareentwickler I want to be able to get the same result on Software-Entwickler keyword as well.
Is there any workaround for this case?
The technique you want is called query expansion. What you have to do is simply replace the query with the one you want and perform the search.
Take a look at this
Here, when someone searches for Russia it will replace the query with russian federation
When filtering in fields on D365, we have the filter option of 'is one of' which is more like SQL's where in clause. I'm trying to perform such filter operation using Odata but can't find the right way. Lambda has an any and all but don't know how to throw in a list to compare against.
Try using the In Function.
?$filter=Microsoft.Dynamics.CRM.In(PropertyName=#p1,PropertyValues=#p2)&#p1='name'&#p2=['value','value']
The full list of filter's.
I am using Scribe Online as an integration service, facilitating the exchange of data between Netsuite and IBM Cloud (formerly SilverPop). In Scribe it's possible to filter the queries made to Netsuite and so narrow the data retrieved.
While I can set the filter to fetch records where e.g. 'internalid is greater than 100;' the condition where 'internalid is less than 100' is not supported; and using a date produces similar result. It seems that 'less than' is not supported and Scribe Support suggest this may be a limitation of Netsuite's API.
How can I filter within a range of criteria e.g. a date range or a numerical range?
Does Netsuite's API limit this kind of filtering or are there ways to achieve it?
I am not familiar with Scribe, but here is how this is accomplished within NetSuite itself.
To compare an Internal ID as a number, you need to use the field internalidnumber instead of internalid. internalid is a String, so the less than operator isn't applicable.
Dates use very different operators. Instead of less, for Dates you would use operators like between, before, after, onorbefore, onorafter. There is a NetSuite Help document titled Search Operators that enumerates all possible search operators and which types of fields they apply to.
I'm integrating elasticsearch into an asset tracking application. When I setup the mapping initially, I envisioned the 'brand' field being a single-term field like 'Hitachi', or 'Ford'. Instead, I'm finding that the brand field in the actual data contains multiple terms like: "MB 7 A/B", "B-7" or even "Brush Bull BB72X".
I have an autocomplete component setup now that I configured to do autocomplete against an edgeNGram field, and perform the actual search against an nGram field. It's completely useless the way I set it up because users expect the search results to be restricted to what the autocomplete matches.
Any suggestions on the best way to setup my mapping to support autocomplete and subsequent searches against a multiple term field like this? I'm considering a terms query against a keyword field, or possibly a match query with 'and' as the operator? I also have to deal with hyphens like "B-7".
you can use phrase suggest, the guide is here:
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-suggesters.html
the phrase suggest guide is here:
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-suggesters-phrase.html