Plugin Author
WPSOLR
(@wpsolr)
I’d like to search with “John Doe”
Did you mean exact search, with double quotes like “John Doe” ?
Yes!
xyfield = John Doe
these exact search filters are working -> xyfield: “John Doe” -> xyfield: *”John Doe”*
NOT WORKING -> xyfield: *”ohn Do”*, only xyfield:*ohn\ Do* would work, but the plugin escapes the escape character from the url xyfield:*ohn\\ Do*
Plugin Author
WPSOLR
(@wpsolr)
Can you complete your examples with the text they are supposed to search in and find/not find.
author:
1. John Taylor
2. William Shakespeare
3. William Taylor
Search url: xy.com/?s=something AND author: *John Taylor*
Results: 1. 3. (i want only the first one)
If i escape the space
http://xy:8983/solr/corename/select?q=author: *John\ Taylor*
, it is working directly in solr, outside the wordpress. In wordpress the escape gets an another escape
xy.com/?s=something AND author: *John\ Taylor* –> wp solr tries to search for *John\\ Taylor*
so there is no result. If it would work, then
xy.com/?s=something AND author: *hn\ Tay*
would work also.
———————-
GOAL: xy.com/?s=something AND author: *hn\ Tay* -> result: 1.
Plugin Author
WPSOLR
(@wpsolr)
Use the “AND” operator:
something AND author:John AND Taylor
It’s ok, but it will fail in these cases…
author:
1. John Taylor
2. John Abraham Taylor
3. Taylor John
xy.com/?s=something AND author: *hn* AND *Tay*
Return: 1., 2., 3. (2 and 3 are not needed)
Plugin Author
WPSOLR
(@wpsolr)
Then you need exact search: ?s=something AND author:”John Taylor”
Exact search with ANYTHING.
field:
1. “Allowed markup: a Clockquote code em strong ul ol li.”
2. “Allowed markup: a blockquote co de em strong ul ol li.”
3. “Allowed markup: a blockquote code em strong ul ol li.”
Search: ?s=something AND field: xy
When the user types: “kup: a blockquote co de em str”, there should be one result, only the 2.
I don’t know how to configure the xy.
xy = “kup: a blockquote co de em str” -> returns nothing, because there are broken words [it works only if there are no broken words at the ends]
xy = *”kup: a blockquote co de em str”* -> returns everything
xy = *kup* AND *a* AND *blockquote* AND *co*… -> It’s great, but i mensioned the problems (it searches separately).
xy = *kup\ a\ blockquote\ co\ de\ em\ str* -> it’s not working in wp solr as i mentioned before
If no solution right now, then let it go 🙂