Noob question: Can one installation power the site search of two different websites?

Now that I have YaCy running again, I did some experimenting, and indeed, it seems YaCy “site” search is implemented in exactly the same way.

I know for example that the word “map” appears several times on my website.
If I use YaCy to search for just “map” I get these results:

989 hits from here there and everywhere.

When I search with YaCy with just “site:peoplesresearchcenter.com map” in the search form field I get this:

Just 4 hits from my http://peoplesresearchcenter.com website and only that website.

Of course, this only works after the site has been crawled and indexed. It does not generally seem to work on the fly, without crawling and indexing the site first.

I don’t really know how “collections” factors into this.

Also I tested this with a fresh restart, with YaCy in Portal mode. I have not been able to verify if it works in community-based mode.

edit: verified, works in either mode, but only after the site is crawled and included in the local index, (or it may just be that these sites are not in any peer index)

The get query string looks like:

`

http://localhost:8090/yacysearch.html?query=site%3Amywebsite.com+term&Enter=&auth=&verify=iffresh&contentdom=text&nav=location%2Chosts%2Cauthors%2Cnamespace%2Ctopics%2Cfiletype%2Cprotocol%2Clanguage&startRecord=0&indexof=off&meanCount=5&resource=global&prefermaskfilter=&maximumRecords=10&timezoneOffset=300

`
where “mywebsite.com” is whatever site is the target of the site search.

%3A is simply the colon ( : ) URL encoded

“term” is the search term

everything after that seems to be just standard. The purpose of which all, I don’t have much of a clue.

including the http:// prefix does not seem to be necessary.

So the important part is:

http://localhost:8090/yacysearch.html?query=**site%3Amywebsite.com+term**

“Site:yourwebsite” could be made to just pre-populate the search text field.

instead of:

  <input type="text" name="query" value="" maxlength="80" 
           style="width:300px; font-size:16px; float:left;" />

do:

  <input type="text" name="query" value="site:yourdomain.com" maxlength="80" 
           style="width:300px; font-size:16px; float:left;" />

might work (notice the only change is to put site:yoursite in value=“” instead of leaving it undefined (blank).

Or it might not work. I haven’t tried it. Not with YaCy anyway.