elastic / app-search-javascript Goto Github PK
View Code? Open in Web Editor NEWElastic App Search Official JavaScript Client
Home Page: https://www.elastic.co/products/app-search
License: Apache License 2.0
Elastic App Search Official JavaScript Client
Home Page: https://www.elastic.co/products/app-search
License: Apache License 2.0
Is your feature request related to a problem? Please describe.
We need to Geo-Bounding Box Query to filter results in a certain area and would like to use App Search to optimize our search experience.
Describe the solution you'd like
Addition of Geo-Bounding Box Query functionality to App Search api.
Describe alternatives you've considered
We've built our search using ElasticSearch api and have implemented Geo-Bounding Box Query, however, we'd like to use App Search for the search tuning features and ease of use .
This issue is prompting multiple client warnings.
Using v7.8.0
A cookie associated with a cross-site resource at http://swiftype.com/ was set without the
SameSiteattribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with
SameSite=Noneand
Secure. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
Hello! I'm having trouble to make disjunctive facets work with signed search keys.
I think it's related to this: elastic/search-ui#347
On this line, I see that we are cleaning up request filters, but on my case filters are still sent this way:
Which seems to cause some kind of issue with AppSearch using signed search keys.
"alerts":[{"code":5001,"message":"Degraded search results","link":"https://swiftype.com/documentation/app-search/alerts#5001"}]
What I tried:
One last thing
My search key only applies one filter:
Any help is much appreciated!!
Thanks
Let's say we are using the facet with the following options
:
const options = {
facets: {
location: [{ type: 'value', size: 6 }],
},
disjunctiveFacets: ['location'],
filters: { location: ['Canada', 'United States']},
};
client
.search('yoga', options);
.then(({ info }) => {
console.log(info.facets.location);
});
If the location Canada
is not in the first 6 most popular facet results for this query, it is not included in info.facets.location
. Only the 6 most populars are accessible. However, I can see we retrieve this data from the request that is not Facet-Only
(since it returns only the two facets that we used to filter).
If we use the facets results to display checkboxes (with multiple selection active), it is a problem since the Canada option will not be shown, and then cannot be remove from the filters. We need to "cache" that selected value, and then display it without it's count.
I don't know if this should be implemented at a endpoint level, but I think the active filters should be returned as the first values when retrieving facet values, so that the UI can be implemented out-of-the-box. Even if they are empty (count = 0). That way, it will be easier to implement a UI based on them.
Hi there,
I am creating an app using Elastic App Search and I am using app-search-javascript. I want to index documents in app search engine. Is there any way to do it using the client?
Hello, I'm trying to determine the source of a given issue. We've built a working search interface as part of our application in React Native using ElasticAppSearch and this plugin. However, an issue seems to arise when we try to access documents beyond a certain point, and at a much lower level than the documentation on ElasticAppSearch would suggest.
If we call for the size of a given search request to exceed 100 documents, it always, invariably, returns just up to 100. All further requests beyond that return no results. We know for certain there are more documents than that in our engine, and have even confirmed this by checking against total results. But for whatever reason, that 100 documents limit is resolutely in place.
Do you all have any insight into this problem? Thank you.
There are cases in which app search is being an API gateway or reverse proxy that benefits from allowing the consumer of the app-search client to specify what the end point should be.
This recently came up on a search-ui implementation where just the production environment was going to be behind a API gateway. This would require implementing a custom handler/middleware in search-ui which would be better to simply have the string concatenation for the endpoint overwritten or specified by the consumer of the SDK.
https://github.com/elastic/app-search-javascript/blob/master/src/client.js#L50
Hi,
I am using the sort
attribute on published_at
(date type) for documents.
But it looks like if the document doesn't have published_at
attribute, the sorting won't display the document:
"sort" :[
{ "published_at" : "desc"}
]
It should sort the documents ร the end even the attributes is missing no ?
The App Search documentation states that one can use a GET
or POST
request when accessing /api/as/v1/engines/{ENGINE_NAME}/search
for a search query. However, app-search-javascript
only allows you to utilize a POST request for this.
POST requests are meant for unique non-repeatable actions, while GET requests are intended for repeatable actions without side effects. An example of how this plays out in the real world is if you submit a POST request on page load, then attempt to refresh the page, Google Chrome will warn you with an alert pop-up asking you to "Conform Form Resubmission".
The above example can occur in @elastic/search-ui
when utilizing "alwaysSearchOnInitialLoad: true". Because @elastic/search-ui
utilizes @elastic/app-search-javascript
as a dep, and @elastic/app-search-javascript
uses POST requests by default, when alwaysSearchOnInitialLoad: true
then the page will fire a POST request, and attempting to refresh the page or navigate back to it will trigger the "Confirm Form Resubmission" alert, even though the user took no action.
We should supply an option so that people utilizing the @elastic/app-search-javascript
library can make the choice for themselves which method to use, based on their implementation requirements.
Please add typescript support!
When upgrading from v8.5.1 to v8.6 or v8.7 my builds start failing with Vite.
I get the following error:
Failed to resolve entry for package "@elastic/app-search-javascript". The package may have incorrect main/module/exports specified in its package.json
Any ideas?
Again I've narrowed it down to upgrading it past v8.5.1.
Hello, can I add SSL verify to false for the client request to the app search server through HTTPS?
Search queries with minus sign dont seem to work in Elastic App Search.
I need to be able to search "-95" and get all the SKU that contain "-95" in the SKU number but it doesn't work with the current setup. Is there a workaround?
The readme has a typo, the link to the FETCH_API documentation misses the last I (capital i).
Also the Query Suggestion example declares the options
variable but does not use it.
I created a pull request to address these.
Hello and thanks in advance for any information you might share.
I have a repo built around this which was working fine when going from http to http API Endpoint... but when deployed into https it's run into CORS issues. Have tried pretty much everything at this point. Figured I'd check in and see if anyone can sanity check the concept in general - is there any reason why this wouldn't work over https? Should I be thinking about this more as a "public key" search client?
I don't want to get too deep into sharing code yet as I'd have to redact but if anyone can sanity check me on whether it's an appropriate use of this for https, I'd appreciate it.
Thank you!
I would like to create a file contributing.md and add following -
1.Difference between GIT and GITHUB
2.How to clone,fork repository
3.How to create a branch and then use git push to push to repo
4.Create a PR
5.Squash commits in a single issue into one
6, Updating the forked and local repo as the updations are made in the upstream
We have a use case where we would like to add filters in query suggestion (e.g. filter out disabled products). Elastic Search itself supports the use case, however, app search doesn't support filters yet. Could you add the support? Thanks in advance!
App search query suggestion doc - https://www.elastic.co/guide/en/app-search/current/query-suggestions-guide.html
Elastic Search suggester doc - https://www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters.html
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.