Skip to content
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

Filter API Search with a language parameter #56

Closed
luddaniel opened this issue May 24, 2024 · 3 comments
Closed

Filter API Search with a language parameter #56

luddaniel opened this issue May 24, 2024 · 3 comments

Comments

@luddaniel
Copy link

Describe the bug
While using API /search query parameter lang or language is not taken in account.

To Reproduce
Example : https://data.agroportal.lirmm.fr/search?pagesize=1&q=phylloxera&language=en
Result:

"prefLabel": [
	"Phylloxera",
	"Phylloxera",
	"حشرة الأوراق الجافة",
	"Phylloxera",
	"Phylloxera",
	"Phylloxera",
	"Phylloxera",
	"Phylloxera",
	"Phylloxera",
	"Phylloxera",
	"Phylloxera",
	"포도뿌리혹벌레속",
	"Phylloxera",
	"فیلوکسرا",
	"Phylloxera",
	"Phylloxera",
	"Phylloxera",
	"Phylloxera",
	"Phylloxera",
	"フィロキセラ属",
	"倭蚜属",
	"Phylloxera",
	"Phylloxera",
	"फाइलोक्सेरा",
	"Phylloxera"
],

Expected behavior
prefLabel and synonym should only contain the specified language.
Also, it should be possible to specify many languages like language=en,fr

@luddaniel
Copy link
Author

Seems fixed by ontoportal-lirmm/ontologies_api#82
But I still experience weird stuff :

Without parameter language
Sans langue


With language=fr
Avec langue fr

What do you think about it @syphax-bouazzouni ?

@syphax-bouazzouni
Copy link
Contributor

Seems fixed by ontoportal-lirmm/ontologies_api#82 But I still experience weird stuff :

Without parameter language Sans langue

With language=fr Avec langue fr

What do you think about it @syphax-bouazzouni ?

@luddaniel, when you do lang=fr it means you filter/search only in values labeled with French tag. It does not mean you display the results in french.

@luddaniel
Copy link
Author

Trouble was with language that does not behave like lang.
I have a really good behavious with https://data.agroportal.lirmm.fr/search?q=poulard&lang=en,fr
Having both search and result in french and english.
Good job, this closes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants