Giter Club home page Giter Club logo

search-autocomplete's People

Contributors

hereswhatidid avatar josephspurrier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

search-autocomplete's Issues

Error 500 with Relevanssi 3.5.9.1

I started getting an Error 500 on the autocompleteCallback AJAX request after updating to Relevanssi 3.5.9.1

I am using version 2.1.16 of SearchAutocomplete

The portion of searchautocomplete.php that passes the query to Relevanssi (line 129) does not appear to pass a WP_Query object to the relevanssi_do_query() as noted in the Relevanssi documentation: https://www.relevanssi.com/knowledge-base/relevanssi_do_query/

I added the following at line 130 of searchautocomplete.php and the issue appears to be solved:

$query = new WP_Query();

Filter to modify wp_query

I'm using autocomplete with Relevanssi and it's working great. However, we have a bit of a special case where we need to modify the query to filter out items. Would it be possible to add a filter to enable modifying the query regardless of whether relevanssi_do_query or get_posts is used?

Positioning of results box

I'm trying to apply a top offset the results by about 10px so it's not butting up right against the input. Just changing the CSS has not solved the problem and I cannot get any javascript tricks to work out either. Any help on how to get this figured out would be super helpful. Thanks.

new filter by callback

Hi,
great plugin it helps alot. But im missing 2 filters by results.
I've made myself, but maybe someone else would need them too, and i wouldnt need to think about it on updates :)

// wp-content\plugins\search-autocomplete\searchautocomplete.php:165
$resultItem = array(
  'title' => $linkTitle,
  'url'   => $linkURL,
);
$resultsPosts[] = apply_filters( 'search_autocomplete_modify_post_result', $resultItem, $post );

// wp-content\plugins\search-autocomplete\searchautocomplete.php:197
$resultItem = array(
  'title' => $linkTitle,
  'url'   => $linkURL,
);
$resultsTerms[] = apply_filters( 'search_autocomplete_modify_taxonomie_result', $resultItem, $post );

Possible to limit search to singular language?

Just installed your plugin on a local install and it works pretty awesome.

However, I have WPML installed as the site is in 5 languages, so I would like my search suggestions to turn up in a singular language only.

The Relevanssi plugin (through which I came to your plugin) actually has something builtin for singular language results, perhaps you can copy that over?

(also posted this as an issue in the WP.org forums)

Performance Improvement

Awesome job guys, but it seems little slow when trying to access database with every query. Would there be a better way to optimize it like just search through a predefined list read from an in memory array.

An tips how can i achieve this ?

Search only on title name

Hi, I can't find a solution to make the search only on the title and not on the post_content, do you know how I could do that?

Thanks

using only taxonomies results in several not related results

I checked for taxonomy (only) and marked only the one that I want for search.

If I search by any word, the autocomplete box shows several words belonging to the taxonomies, but it's not matching any criteria neither filtering by the keyword entered.

I type any word in search, existing in the taxonomies or not, and it shows all of the taxonomy names and some other words I'm not sure why they show.

Also I think that maybe it's somehow considering the not empty taxonomies, like if with hide_empty=1, because I have lot more taxonomies that do not show in the list, which is okey. But if it does not match the criteria keyword, it's not good yet for me.

Can you help with this?

thanks

Enter some whitespaces (more then minLength)

Enter some whitespaces (more then minLength) - as result all posts are fetched. This is bad behaviour, we must trim our input, and call ajax query only if minLength is reached with character, not with whitespace.

Relationship Between WP Search Results and Search-Autocomplete Search Results

Afternoon,

Great plugin and it's been working well for the site we have it implemented on. A question that has come up from the client and I figured coming to the source might produce the best answer.

Our site uses Search-Autocomplete to show search results as the user types in a field, but we also have a search button that takes them to a Search Results page. We're seeing 2 different sets of results between the Search-Autocomplete flyout and the results on the WP Search Results page. There is some overlap, but not all the same results and definitely in a different order.

Is there a way to sync these up?

Thanks,
Brian

Need to limit to post_type when the onkeyup AJAX occurs

I have been able to add <input type="hidden" name="post_type" value="news" /> and it works if you search and click submit. However, the auto suggest still provides all post types. I've noticed that even if I could add post_type=news in the GET request where the search autocomplete goes when keyup events file. For example, I tried 'curl -v 'http://localhost/wp-admin/admin-ajax.php?action=autocompleteCallback&term=something&post_type=news' but I get all posts, regardless of their post type.

If there is a way to do this without you having to change the code (perhaps I'm missing some very simple function that I need to add), I'd be glad to try it, but I wanted to record this as an issue in case it hasn't been addressed in the code base.

Custom message if nothing found

It would be really nice if there were an option to return a "No results found" message if the search didn't find anything. The message could be displayed as one of the <li> items inside the autocomplete box with possibility to edit the message from within the admin.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.