mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
automatically add a wild card if only a search on a single domain is
done. This makes it possible to search all documents on a single domain even if no search word is given. This is in particular interesting when searching for all images on a single domain.
This commit is contained in:
parent
abde89438b
commit
9b92685771
|
@ -362,6 +362,7 @@ public class yacysearch {
|
|||
final RankingProfile ranking = sb.getRanking();
|
||||
final QueryModifier modifier = new QueryModifier();
|
||||
querystring = modifier.parse(querystring);
|
||||
if (modifier.sitehost != null && modifier.sitehost.length() > 0 && querystring.length() == 0) querystring = "*"; // allow to search for all documents on a host
|
||||
|
||||
// read collection
|
||||
modifier.collection = post.get("collection", modifier.collection); // post arguments may overrule parsed collection values
|
||||
|
@ -372,7 +373,7 @@ public class yacysearch {
|
|||
if (querystring.length() == 1) {
|
||||
querystring = Segment.catchallString;
|
||||
} else {
|
||||
querystring = querystring.replace('*', ' ').replaceAll(" ", " ");
|
||||
querystring = querystring.replaceAll("* ", Segment.catchallString + " ").replace(" *", " " + Segment.catchallString);
|
||||
}
|
||||
}
|
||||
if ( querystring.indexOf("/near", 0) >= 0 ) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user