Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
Hi everybody I´ve been working with couch for a while now and I really really like the flexibility for people like me (just beginning with PHP).

I have a question regardless the search function, I know it search within all editable regions and it works fine, but I have this case where it’s not working the way a meant.

Let’s say I have a clonable template (let’s call it insert.php) with some editable regions in it, this template doesn’t have a list view either page view and so it’s not executable, it’s only intended to insert its content into another templates views (like the Index, About etc.).

The problem: When I search for some content that exists in a cloned page from insert.php there is nothing found, I realized it’s because the template is set to executable=”0” so I change this value to “1”.

Now I make the search and the content can be found, the problem is that the search result list the cloned page from insert.php where the content exists (remember there is no list view, either page view so this is useless). What I really need in this case is that the search results show the page where that content is really shown. Example: show the index page where using the pages tag I embedded the content from insert.php.

Now I don’t think this is possible as the content in database only exists within insert.php not within index.php but I was thinking this may be achievable making the search to find for the content in the cache files instead of the editable regions.

Is there anybody who knows how to do this? Any help will be appreciated
Hello and welcome, lestat

Broadly speaking, there are two kinds of searches - internal (i.e. searching the database) and external (i.e. searching the generated pages).

Couch uses the first one while examples of the other could be dedicated search engines like Lucene (or even Google).

Both have their pros and cons. Internal is a lot simpler as the content to be searched is already present (as opposed to external search where pages need to be scraped at regular intervals o find the content). We've opted for the simpler method.

Your idea of searching the cache is nice but I'm not sure if we'll switch to external search as it has its own set of problems.

Anyway, one can always deploy Google search on the site if something on that line is required.
Your thoughts?
2 posts Page 1 of 1
cron