New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Search for Community using elasticsearch #222
Conversation
Override search mapping here
Don’t override to_search_mapping here
@@ -1,2 +1,3 @@ | |||
web: bin/puma -C config/puma.rb | |||
worker: bin/rake jobs:work | |||
elastisearch: elasticsearch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo. elastisearch => elasticsearch
@madhuvishy @surenm (@davidbalbert, I'd love you opinion as well) I'd love to start thinking about our query syntax a bit more. The Elasticsearch query DSL is quite extensive, and it would be cool to take advantage of more of it. In particular, I'd love to support narrowing queries based on subforums, thread titles, and post authors. Proposed query syntax (the email formatting of this might suck – look at it on GitHub for a pretty table):
The basic idea of the above is Another thing to consider is which part of our code should know about this mini-query language: the client or the server? Should the client be sending the server the string
or should it parse the query and send a data structure
I think we should go with the second option and do the parsing on the client. The client is going to want to know the syntax anyways so that it can help users make correct queries. But I don't have strong opinions about this yet. |
On searching with facets: This is definitely the next thing we wanted to work on. We thought we could put the DSL construction logic on the server side, but it does make sense that the client already knows for auto completion. |
+1 on using query DSL stuff and it was part of the plan to do this first before going to intent discovery. Like @madhuvishy said we had originally intended to do a dumb client against a search server/autocomplete endpoint which takes care of all intent discovery but the client side approach could be appropriate for community since a lot of action happens client side. I don't know which is a better method either but from my previous experiences I have always constructed the DSL on server side with varying levels of intelligence on the client side. |
|
||
|
||
(defcomponent search-bar [app owner] | ||
(display-name [_] "Autocomplete") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should make this "SearchBar" or something.
Style bug: In Firefox, the server error box looks weird. Edit: Fixed. -Zach |
:query "foo bar baz"}) | ||
;; => | ||
"/api/search?q=foo bar baz&filters[author]=Zach Allaun" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it was scratch, right? I think we should get rid of it.
Ok, this is good to go. We're deploying :) |
First cuts for search feature for Community