ufal / lindat-kontext

An alternative web front-end for the Manatee corpus search engine
GNU General Public License v2.0
5 stars 1 forks source link

Search filter using url attribute #222

Open vidiecan opened 5 years ago

vidiecan commented 5 years ago

I have a bigger request for the new Corplist: make it possible to let the search filter be set from outside (URL attribute). It looks like the filter is set that way, but it is not working for me, e.g.: https://lindat.mff.cuni.cz/services/kontext/corplist?keyword=ko Also the label text should be possible to use, not only language code, i.e. ‘ko’ or ‘Korean’.

The use case is “searching” (in labels, but at least someting) from outside. See the proposed new homepage of LINDAT with multi-search box here: https://clariah.lindat.cz

stranak commented 5 years ago

@Kira-D says:

Could you please explain the use case a bit more?

Sure, it is simple. Look at https://clariah.lindat.cz/. It is a prototype of the new LINDAT/CLARIAH web. In the main element of the page: a multi-search main window there is a "search corpora" that must work and do something. I think it should search for corpora, not inside corpora. So it just redirects to the page with a query, e.g. I type "finnish syntax", or "czech audio".

Which keywords should be used (just languages/all keywords from the corplist page/just one/multiple)?

Multiple.

What should happen if user searches by invalid keywords (does not exist/has a misprint)?

The same thing that happens now in your search element?

"It looks like the filter is set that way, but it is not working for me" -- No, the form is controlled by javascript, all the parameters are sent to the back end on some events (or timer in case of Advanced filter), the page is not fully reloaded on change, only the parts with changes are re-rendered; I'd say that these are two different mechanics. I think that it will be tricky to keep the current functionality and add this new feature.

I have some vague ideas of how I would try to do it, but I would prefer to hear an opinion of more experienced members of our team.

Jozef, Ondrej, what to do you think?

kosarko commented 5 years ago

@stranak @vidiecan so the search on the new web does nothing fancy (e.g. suggest) just takes the input and "posts" it to the "kontext corpora search"?

stranak commented 5 years ago

@stranak @vidiecan so the search on the new web does nothing fancy (e.g. suggest) just takes the input and "posts" it to the "kontext corpora search"?

Yes, that is the idea for now. However if providing auto-suggest (just from the labels and titles?) would be possible, that would be very cool. But only if it seems manageable also for the other search types (services) in the main LINDAT/CLARIAH search box.

Jan @hajic would much prefer it to be Google-style search, i.e. directly in all data and display results right on the page. So that means some way to do snipets, some rank, etc. I have been arguing that is way too complicated for now (= this project's duration).

So I think the idea is to provide best possible search, but taking into account it has to be able to plug in other services without 10PMs of upgrading each of them :) To me it means it has to be simple like this.

Ansa211 commented 5 years ago

Related: #229