Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Jason Stoltzfus
    @JasonStoltz
    It just depends how you want to have your project set up. That is how I usually set things up, a separate provider for the nav (with trackUrlState turned off) and a search provider for the main search results page (with trackUrlState turned on). That's a totally legit setup.
    Nathan Petts
    @nbpetts_twitter
    OK, I just wanted to be sure that made sense before I stared debugging. An issue you addressed about using the driver directly makes our setup work properly. Thank you.
    Jason Stoltzfus
    @JasonStoltz
    Ok cool, glad you figured it out :thumbsup:
    Damon Ponder
    @damonponder
    Jason, I am a Software Engineer with NASA and I am working on a unique tool for NASA called insight. My manager has notice your search-ui as being very similar to what he is looking for, in terms of the build out of this tool. He has tasked me to look into it just a bit deeper, as he is not yet totally convinced that REACT is the right tool for the job. I, on the other hand, and fighting hard for the use of REACT because of its fantastic component use capabilities. The question that he has, and I, is in terms of data. I am not sure how large the data sets that you are searching are, but, the datasets, as I am sure you can imagine, are very large here. How do you deal with large datasets in terms of searching, not to bog down the tool and cause slow load times. My manager was indicating that facebook does some of this across the server. Wondering if you might have any ideas in terms of speeding up load time with large datasets using a tool like the one have created here?
    @JasonStoltz
    sophijka
    @sophijka

    Hi @JasonStoltz , a quick question on buildRequest.js, if set as

    bool: {
            must: [match],
            ...(filter && { filter })
          }

    it doesn't seem to do phrase match. match_phrase from https://www.elastic.co/guide/en/elasticsearch/reference/7.x/full-text-queries.html doesn't seem to be supported - is there any way to include phrase matches? Thanks!

    Jason Stoltzfus
    @JasonStoltz
    @damonponder Search UI is just a tool for composing the front-end, the size of the data set has no impact on search-ui. It gathers user input, ships the data in a query to the backend, and then renders the results. That's it... it doesn't matter to search-ui whether your data set is 100 records or 100 million. That is a concern of whatever backend you choose. For questions on the scalability of App Search or Elasticsearch, I suggest checking out the docs (https://www.elastic.co/guide/index.html) or community forums (https://discuss.elastic.co/).
    @sophijka The example we give in buildRequest.js is just a generic search query to get your started. Every Elasticsearch user will have different search needs. If you need that to support match_phrase, simply adjust it as needed per the docs that you posted.
    sophijka
    @sophijka
    Thanks, @JasonStoltz! I also added synonyms, and it's really fun how they are highlighted in case query terms are not found. I do have a quick UI question, though. Paragraphs I've indexed tend to be long, and hence I updated fragment_size in highlight. That said, I've often see a fragment where the found term is the last one and the right context is completely lost. Is there perhaps any way to center a fragment around a term (especially in cases of a single occurrence)? Many thanks, as always.
    Jason Stoltzfus
    @JasonStoltz
    Good question @sophijka. You're getting out of my area of expertise here, have you checked out the Elasticsearch docs on highlighting? https://www.elastic.co/guide/en/elasticsearch/reference/7.10/highlighting.html. You might be able to adjust offset or something like that.
    Thanh Nguyen
    @harryct229
    Hi Guys, I have 1 question about App Search. I have a field for soft delele called "is_active". How can we restrict the search for active documents only and not show it as a param on the address bar?
    Jason Stoltzfus
    @JasonStoltz
    Ohhhh I know this one, one sec.
    Gotta look it up
    OK, so you can add a filter as a "Global Filter", in the "searchQuery" configuration option, and it will be applied to all queries, but have no impact on search state (i.e., it won't show up in the address bar). elastic/search-ui#473
    Give it a shot, I need to add that to the docs as well.
    Thanh Nguyen
    @harryct229
    @JasonStoltz It works. Thank you so much.
    Thanh Nguyen
    @harryct229
    Hi @JasonStoltz, I have 1 more question. Can we add default analytic tags for every query? For example tags for development, staging and production env.
    Thanh Nguyen
    @harryct229
    I found it.
    "analytics": {
          "tags": [
            "development"
          ]
     }
    Jason Stoltzfus
    @JasonStoltz
    :raised_hands:
    sophijka
    @sophijka
    Thanks, @JasonStoltz. One more question I have is on facets, or better say, running aggregate queries before executing the main query rather than post-filtering. This would be the case of listing all unique values for a particular field X, selecting a value from a drop-down list and passing it as an additional constraint when executing a query (a combination of a query typed by a user and the value of field X). I've tried to change buildRequest, yet I'm not sure if SearchUI supports it. Thanks again!
    sophijka
    @sophijka
    I managed to run an aggregate query and could see correct results returned in console logs (not rendered), but I'm still wondering how to trigger an aggregate query before the main query on page load, and then use a modified buildRequest in config's onSearch.
    Jason Stoltzfus
    @JasonStoltz

    Hey sophijka. I think post filtering (or the disjunctive approach that is already implemented in onSearch) will give you the behavior you are looking for.

    listing all unique values for a particular field X

    That is what faceting / aggregations is for.

    passing it as an additional constraint when executing a query

    This is what post filter is used for (or alternatively, passing it as a regular filter and using the already implemented "disjunctive faceting" approach).

    Search UI supports whatever queries you want to run. You can do literally anything you want to do in onSearch. You can run multiple queries, a single query, you can return static data ... literally anything you want. You just need to provide a function that accepts Request State and returns Response State .... https://github.com/elastic/search-ui/blob/master/ADVANCED.md#event-handlers

    The provided code in the Elasticsearch example is just that, an example. You'll need to dig into it and get your hands dirty to customize it.
    sophijka
    @sophijka
    thanks, @JasonStoltz. This is more or less what I've implemented now (two queries, one aggregated to dynamically populate a drop down list, and another is the modification of search on search terms + selected value from the drop down list). Moving on to result export :-) Thanks for your support & happy holidays!
    Akshit Kr Nagpal
    @akshitkrnagpal
    Hi Everyone.
    We are running into scalability issues using Self Managed App Search and wondering whether someone here can help us.
    One engine with 4,780 documents. We perform a search in our backend service but I am seeing that the API request to elasticsearch is taking 200-300ms every time. Is this normal? I was assuming it would be faster than this.
    Also, our number of requests is increasing and under peak hrs (2000+ requests per second) we are getting “Service Unavailable” from the App Search endpoint.
    Any help would be appreciated.
    Jason Stoltzfus
    @JasonStoltz
    @akshitkrnagpal The Elastic support team can help you out. Please contact them directly.
    Meave Abdelhamid
    @Meaveryway
    Hello everyone. Thanks for the amazing work and resources that you are providing for everybody as open source <3
    I am currently interested and experimenting with SearchUI and I was wondering if there are any projects/websites "built with SearchUI" that are publicly consultable besides the parks and video-games samples?
    Some links would be very helpful.
    Jason Stoltzfus
    @JasonStoltz
    https://www.elastic.co/search is a good example
    Meave Abdelhamid
    @Meaveryway
    @JasonStoltz thank you so much, that will do greatly for a showcase.
    One more question but it's not purely related to SearchUI, is it possible to connect 2 or more indexes to a same engine?
    Jason Stoltzfus
    @JasonStoltz
    It lets you query 2 separate engines as if they were one
    Meave Abdelhamid
    @Meaveryway
    That definitely seems like the solution I need, I will explore it. Thank you again so much @JasonStoltz .
    Dregears strings
    @dregearstrings_gitlab
    Hello there.
    I am building a search engine with App Search + Search UI and I hit a wall: Is there a way around in order to index files in full-text with App Search? the Documents API has a size limit of 100Kb and files' content that will be indexed in my use case can be bigger than that. I thought I could still index manually with a normal procedure or with FSCrawler but I can't even seem to find the indices created through App Search when accessing through Kibana for instance.
    Is App Search ultimately not the solution I should be seeking for or did I just hit a cluelessness wall?
    Dregears strings
    @dregearstrings_gitlab
    for the size limit, documentation says that it's configurable since version 7.7 but i can't seem to find such options. We're currently doing with a basic plan on premise.
    IliasLG
    @IliasLG
    Hi, I'm looking for help with the sorting component of react search-ui
    I try to make a custom view to adjust the html structure
    I created my own view and tried to replace the <Select> component from 'react-select' with my own html. But that doesn't work
    I want to change the divs that the <Select> component creates to a <select> with multiple <input>
    Jason Stoltzfus
    @JasonStoltz
    @dregearstrings_gitlab The configuration can be found in config/enterprise-search.yml: https://www.elastic.co/guide/en/app-search/7.10/configuration.html#configuration-file
    @IliasLG You need to be more specific than "that doesn't work". Please provide more information. In the meantime, here is an example that provides a custom view for sorting: https://codesandbox.io/s/search-ui-national-parks-example-with-sort-icons-q09dr
    Jason Stoltzfus
    @JasonStoltz
    @dregearstrings_gitlab All indicies for App Search are created and prefix with .ent-search-. Though when using App Search, you don't really need to know that or work with them directly
    IliasLG
    @IliasLG

    @IliasLG You need to be more specific than "that doesn't work". Please provide more information. In the meantime, here is an example that provides a custom view for sorting: https://codesandbox.io/s/search-ui-national-parks-example-with-sort-icons-q09dr

    Already fixed it

    Dregears strings
    @dregearstrings_gitlab
    @JasonStoltz Alright thank you so much for your support!
    sophijka
    @sophijka
    Hi @JasonStoltz . A quick (and silly) question on ordering of fields in the results tab - I've seen a support ticket on that and checked the source code in react-search-ui but couldn't find anything related to the order of fields. Is there a way to specify the desired field order (same for all documents in the result tab, say text, sector, ...) or would one need a custom component for that? Right now, fields seem to be ordered randomly and, with many metadata fields, the result doesn't look very user-friendly. Also, an id is needed for search (hence specified in buildRequest.jsrequest), but I'd rather hide it from the UI. Thanks & have a great weekend.
    Thanh Nguyen
    @harryct229
    Hi guys, How can we disable api logs and analytics logs for some queries? For example, query calls from Backend. Thanks
    Jason Stoltzfus
    @JasonStoltz
    @sophijka What backend are you using?
    Looks like elasticsearch
    I think you need to use a custom view for the result component
    @harryct229 You can't disable it on individual queries. You can add analytics tags to queries though, so you can filter down to only queries that match a particular tag
    Thanh Nguyen
    @harryct229
    I see. I am doing as you suggested right now. Thank you.