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
Search callback routing cleanup #1368
Conversation
This unifies the stream and page_search query parameter usage. Both now use the 'q' parameter. Additionally, the search string is passed to `simpleSearch` directive and the `QueryParser` instead of an object with a "query" or "q" key. The clump of conditionals in the route update event handler is removed. Instead, the viewer and page search redirect to one another and the stream can be totally ignorant of the involvement of the location. The views are updated to use ?q= for /u and /t shortcuts.
Currently the stream does not work, we have annotator-store error:
|
Also broke tests.
|
@tilgovi: Changing the |
@gergely-ujvari changing the tag object to 'tags' fixed the |
Hmmm, but it has broken the page search. Let me check. |
Oh, I see I was inconsistent. Let me fix that the tag/tags issue. |
I'm testing here on the commits I pushed to this PR (without your most recent one). Tag search works in the stream with |
Okay. I like "tag" as the facet. Not sure which you intended. |
I'll fix up the tests. |
Okay. The tag facet will stay. I'll fix the stream to expect that. (And after that we can squash these fix commits) |
Okay. Tests fixed. |
Ok, the tags/tag is fixed too. |
Hmmm. I can't reproduce it. 😕 |
Are you using the ?q= format? |
Hmm. So if you search for just "test" and you have an annotation with a body On 08/01/2014 08:52 AM, Randall Leeds wrote:
|
Well, now I'm suddenly getting a coffeescript error:
|
Me too |
Missing single quote: - and_or: 'and'
+ and_or: 'and |
Yeah, noticed. Sorry for that. It was unintentional. |
You mean it wasn't on purpose? ;) |
It's all good. |
:) Let me fix and rebase |
I'm on it. |
@gergely-ujvari lets see if travis is happy |
@tilgovi: I can still reproduce the store issue. Which ES version are you using? |
1.1.0 |
Also tag search doesn't really work for me. It returns everything. |
Stream or page-search? |
Stream. I'll check page. |
Tag returns no results for me in page search, but every annotation in stream. |
Strange. Yes seem to be working for me... are we looking the same branch? |
|
I would hope we're looking at the same branch. We both just pushed to it :-D |
Let me recheck all. (Installed newer ES meanwhile) |
Okay, so. Upgrading ES from 1.0.1 made the store exception go away. |
Stream search. For me this is working pretty well: |
Are you sure? It returns everything for me. |
@tilgovi: can you send a screenshot. It may help for me figure out this. Page search: I see the problem, it returns every annotation with a tag in it. |
I just fixed page search. You had missed a spot in QueryParser. |
Both views working for me now. |
Hmm. I still get the page search problem. and you search for tag:foo it returns both |
You're right. |
But not on stream search. |
Yes, the error is in the ViewFilter. Debugging right now. |
The filtered copy list was not assigned back to the variable and accidently we were comparing the value.length instead of the filter.terms.length to check whether all tags have matched or not.
@tilgovi : if it also works for you, I think this is good to merge. |
@gergely-ujvari looks fine for me. Merge when the tests pass. |
Search callback routing cleanup
@tilgovi: Thanks for cleaning up the routes! The code looks much nicer now! 🍺 |
🍺 |
I cleaned a few things up after the simple-search merge and unified the routing and location usage a little bit. I also fixed the "tag:foo" facet.