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

package_autocomplete only find packages that start with the given search query #2697

Closed
metaodi opened this issue Oct 21, 2015 · 4 comments
Closed
Assignees

Comments

@metaodi
Copy link
Member

metaodi commented Oct 21, 2015

The current implementation of package_autocomplete looks like that:

like_q = u"%s%%" % q

So only packages that start with the given string will be returned.
I expected something like %searchterm%' to get better results. E.g. format_autocomplete uses this format as well.

Or was this intentional?

@metaodi
Copy link
Member Author

metaodi commented Oct 21, 2015

PR for this issue: #2698

rossjones added a commit that referenced this issue Oct 21, 2015
[#2697] Make sure package_autocomplete uses LIKE with wildcards
rossjones added a commit that referenced this issue Oct 21, 2015
…mplete

Revert "[#2697] Make sure package_autocomplete uses LIKE with wildcards"
@rossjones
Copy link
Contributor

I merged this and then reverted it when wardi pointed out that it doesn't have the right type of index. As punishment I'll make it work with Solr tomorrow and send a PR. Sorry again.

@rossjones rossjones self-assigned this Oct 21, 2015
@wardi
Copy link
Contributor

wardi commented Oct 22, 2015

I don't think this action is used anywhere in core CKAN at the moment, maybe we should consider deprecating it instead of updating it?

@metaodi if you use this action and want it to behave differently why not add it to your own extension?

@metaodi
Copy link
Member Author

metaodi commented Oct 22, 2015

@wardi Ah sure I can put it in my extension, I just thought this was a bug. I'm fine with deprecating it.

@wardi wardi closed this as completed Oct 22, 2015
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

3 participants