[wp-trac] [WordPress Trac] #33988: New param for search in WP Query
WordPress Trac
noreply at wordpress.org
Tue Sep 29 18:47:54 UTC 2015
#33988: New param for search in WP Query
------------------------------+-----------------------------
Reporter: sebastian.pisula | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Query | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
------------------------------+-----------------------------
Changes (by boonebgorges):
* milestone: Awaiting Review => Future Release
Comment:
> I think that good idea is, if param "s" will be have support for array.
Use `search_terms`. `get_posts( array( 'search_terms' => array( 'tiger',
'lion', 'dog' ) ) )`
I like the idea of `NOT LIKE` searches, but I wonder if we can come up
with a more elegant syntax than 'without_s'. For example, we have
'search_terms'; maybe we could add something like 'search_terms__not_in'.
Or maybe we could add boolean operators to the search, so that
`'search_terms' => array( '-tiger', 'lion' )` will match posts *with*
'lion' but *without* 'tiger'. See
https://support.google.com/websearch/answer/2466433?hl=en for a list of
what Google supports.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33988#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list