Self hosted app search .Net Core UI

Good Day,
We are planning to use app search self managed service to integrate into .Net Core MVC UI.
I am able to set up app search self managed instance on Linux machine.
Is there any sample Appsearch client UI in .net. There is no client available on https://swiftype.com/documentation/app-search/getting-started clients..

Any guidence is much appreciated.

Thanks and Kind Regards
Srini

There is no .NET client for App Search.

The API is documented here: https://swiftype.com/documentation/app-search/api/overview.

We also have an OpenAPI spec here, if that helps: https://github.com/elastic/app-search-php/blob/master/resources/api/api-spec.yml.

Jason

Thank @JasonStoltz for your reply. I will try it and let you know how it works.

Hi @JasonStoltz
I am querying the self hosted appsearch engine.
Bbelow is the query which is works perfectly

{"query":""9781848105805" AND "Wonderful Weaver" AND "Miles Kelly" AND Paperback "}

Now, I need to choose the date range on specific field which i am having issue,

I tried below query but no luck.

"9781848105805" AND "Wonderful Weaver" AND "Miles Kelly" AND Paperback AND publicationdate:[20020101 TO 20030101]

Basically i need to know how to use the single query on date ranges for specific field.

http://xxxx.com/api/as/v1/engines/my-search-engine/search

Thank you very much

You can apply a Range Filter for that: https://swiftype.com/documentation/app-search/api/search/filters#range-filters

Dear @JasonStoltz,

thank you for assisting so far..

Your suggested link looks promising in my requirement, i tried and i am getting below error response.

Please can you suggest:

Request Body

{
"query": "Wonderful",
"filters": {
"publicationdate": {
"from": "1950-01-01T12:00:00+00:00",
"to": "2025-01-01T12:00:00+00:00"
}
}
}

Response body:

{
"errors": [
"Filters contains invalid value for field: publicationdate; must be a string, or an array of strings"
]
}

Go to the Schema page in App Search and make sure the publicationdate field is set to Date.

Thank you.. i have to clean the data as well.

hi @JasonStoltz
Thank you for your responses.
It was working fine.. now i am getting this error.. i have 100K records now

{"errors":["Internal server error. Please check your application server logs for more details and contact Elastic support if the problem persists"]}

index [.app-search-actastic-engines_v2] blocked by: [FORBIDDEN/12/index read-only / allow delete
any idea.?

Hmmm, that doesn't look good. What API requests is that happening on? Also, what version of App Search are you using?

A quick google search lead me to this. Is it possible you're low on storage space?

The forbidden 12 read only error Elasticsearch and the read delete only API error Elasticsearchx000D typically happens when Elasticsearch reads the disk as being low on storage space and will therefore put itself into “read-only” mode.

Api i am using is

@JasonStoltz, thank you very much..

Hi @JasonStoltz
Thanks for help so far.
I got one more issue..

i need to use filters in multiple fileds with combinations of dates, and strings and numbers

i am getting below error
{"errors":["Filters contains an invalid set of keys for object inside of field: filters root; can only have clauses or a single field name","Filters contains invalid key: authFilter"]}

my request json is :

{
"query": ""Deon Meyer"",
"page": {
"size": 50,
"current": 1
},
"filters": {
"authFilter": {
"Field": "contributors",
"Value": "Deon Meyer"
},
"publicationdate": {
"from": "2000-03-05T00:00:00-05:00",
"to": "2021-03-05T00:00:00-05:00"
}
}
}

The guide for combining filters is here: https://swiftype.com/documentation/app-search/api/search/filters#combining-filters

A similar question was asked recently as well: Error: [400] Filters contains an invalid set of keys for object inside of field: filters root; can only have clauses or a single field name

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.