materialsintelligence / matscholar-web

Code for the Materials Scholar website
http://matscholar.com
MIT License
9 stars 11 forks source link

Autocomplete should only suggest normalized entities #112

Closed AmalieT closed 5 years ago

jdagdelen commented 5 years ago

The way autocomplete works is it completes whatever you were typing but fills in the normalized version.

AmalieT commented 5 years ago

That doesn't seem to be what's happening on the front end right now? Try typing in Descriptor: Nanoparticle(s) for example.

AmalieT commented 5 years ago

Tagging this frontend since it seems that may be the issue here

AmalieT commented 5 years ago

@ardunn is this because of the way text is transferred from the entities boxes to the main search box?

jdagdelen commented 5 years ago

Maybe we switched this. However, shouldn't entity normalization happen on the back-end once a query comes in?

AmalieT commented 5 years ago

It does, but I thought from a user perspective it should be clear that searcing nanoparticle vs nanoparticles or SiO2 vs O2Si are equivalent. It helps highlight the added value that we have vs plain text search engines.

ardunn commented 5 years ago

The current frontend just uses ESAutosuggest like the old one did. I haven't goofed around with exactly what it is doing yet. I'll fix soon

jdagdelen commented 5 years ago

The ESAutosuggest has two fields available in its results list, 'original' and 'normalized'. Right now as we have it defined we're using the default filed of 'original'.

https://github.com/materialsintelligence/matscholar-web/blob/1eb2ecb9cd8ea7bb77b70f8bb31657eeeeb498a1/matscholar_web/search/view.py

jdagdelen commented 5 years ago

Ok, I just switched it to display and fill normalized entities on the staging site. Let's try it out and see how we feel about that.

AmalieT commented 5 years ago

Feels ok, but I wonder if there's an intuitive way to have the normalization happen between transferring from the entity box to the main search box?

jdagdelen commented 5 years ago

There is a way to do that. Just have to modify how ESAutosuggest works on the React side. However, this might be confusing to the user. I think the best solution is to normalize on the backend and indicate to the user that it’s also searching on equivalent terms. On Tue, Oct 1, 2019 at 1:45 PM, AmalieT notifications@github.com wrote: Feels ok, but I wonder if there's an intuitive way to have the normalization happen between transferring from the entity box to the main search box?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub [https://github.com/materialsintelligence/matscholar-web/issues/112?email_source=notifications&email_token=ACFODYIZWAXGKLYQT2TYN3DQMOZHJA5CNFSM4I4OFUW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEACV3TQ#issuecomment-537222606] , or mute the thread [https://github.com/notifications/unsubscribe-auth/ACFODYKANZUTH3P6XSUL3TLQMOZHJANCNFSM4I4OFUWQ] .

AmalieT commented 5 years ago

Let's revert the normalization change on ESAutoSuggest then?

computron commented 5 years ago

I think this is superceded by #124 - reopen if needed