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

support for wildcard searching on Tag field #738

Closed
wants to merge 1 commit into from
Closed

support for wildcard searching on Tag field #738

wants to merge 1 commit into from

Conversation

lmgonzales
Copy link
Contributor

No description provided.

@demiankatz
Copy link
Member

Thanks for this. I've just committed a variation to master.

It occurred to me that there are two totally different contexts in which a user searches for a tag. One is a case where they click on a tag on a record page and go to Tag/Home?lookfor=tag. In this case, we want to do literal matching; we only want to show exactly the tag that the user clicked on. The other is a case where they do a search with the tag selected, which will send them to Search/Results&type=Tag&lookfor=tag. In this case, it makes sense to add support for wildcards, etc.

Ultimately what I ended up doing was creating a new search method based on your work at commit 4ff77ed and then also writing commit a86c428 which uses VuFind's hidden filter functionality to flag the search vs. retrieve situations so we can behave appropriately in each scenario. I also added some extra query processing smarts so that if you really want to search for a tag with an asterisk or percent in it, you can escape with a backslash and get appropriate results.

It's probably not the most beautiful, elegant code in the world, but I think it gets us what we want. Please give it a try when you get a chance and let me know what you think!

@demiankatz demiankatz closed this Jun 23, 2016
@lmgonzales
Copy link
Contributor Author

Thanks Demian. The modifications/upgrades make a lot of sense to me. I'll give it a try and will let you know how it goes!

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