core icon indicating copy to clipboard operation
core copied to clipboard

Site Search doesn't include SYSTEM_HOST (All hosts) content

Open mabouza opened this issue 13 years ago • 9 comments

When creating a Site Search job that includes a list of hosts, the content for All hosts (SYSTEM_HOST) doesn't get included.

On a multi-host site, we may have content that is for a specific site and content that is for all hosts, there is no way to create an index that includes both.

There isn't even a way to create an index that only includes SYSTEM_HOST to try to search from two indexes in the frontend.

SYSTEM_HOST content only gets added to the index if we index all hosts, which is not feasible in a multi-host environment.

mabouza avatar Jun 18 '13 00:06 mabouza

@mabouza this is correct. We can add something moving forward but if your sitesearch is incremental it should be feasible to do all hosts even in a multihost environment.

jtesser avatar Jun 18 '13 03:06 jtesser

And just to be clear - this is only for URLMapped content, correct?

dotcmsCodeReview avatar Jun 18 '13 11:06 dotcmsCodeReview

@jgambarios fix as we discussed.

jtesser avatar Jun 18 '13 14:06 jtesser

I'm not sure about anything else, but I think only URLMaps would have this issue.

mabouza avatar Jun 18 '13 21:06 mabouza

@jgambarios we need to document what happens for site search when using URLMap content on the docsite under site search

jtesser avatar Jun 20 '13 13:06 jtesser

JT, I was looking at this fix and I don't think the fix is correct. This only adds the SYSTEM HOST to the results if the Structure doesn't have a Host field.

If the Structure has a Host Field, we may have content that is site specific and some content that is associated manually with System Host. This means that we would want to get all the site specific content + all the System Host content on the results.

So think about this case, we have a Book Structure with some Books that are for all Hosts and some site specific Books. So we add a Host field to the structure, and mark them appropriately. With this fix, If I'm searching on my host1.dotcms.com, I only get the site specific Books, even though I'd still want to get the All Hosts Books.

The fix should have been to always add System Host to the list of Hosts no matter what. This is exactly how the Content Search works.

mabouza avatar Jun 21 '13 20:06 mabouza

@jtesser have you seen my comment above? Thanks.

mabouza avatar Jun 25 '13 19:06 mabouza

I have we are working on it in #3132

jtesser avatar Jun 26 '13 16:06 jtesser

Thanks JT! :)

mabouza avatar Jun 26 '13 16:06 mabouza