I'm probably overlooking or misunderstanding something, but I can't figure out how to get a faceted search environment to just search "everything": Title, taxonomy, and any CCK fields I have indexed. If I use the default "Anywhere" search, I only get keyword matching against node titles and taxonomy (node bodies are disabled in my content type). If I activate the "in [some field]" option, I only get keyword matching against that particular field, not any other fields, and titles/taxonomy are not searched. Ideally I would be able to search within all indexed fields, and titles/taxonomy, thus not exposing the "where to search" dropdown to users. Is this possible?

Comments

David Lesieur’s picture

Unless there is a bug, the Anywhere search should do what you expect, searching the node bodies, titles, CCK fields, and taxonomy — in other words, searching the core index.

Grantovich’s picture

Maybe there is a bug then, because as far as I can tell, Faceted Search isn't searching my fields. I do have the CCK Field Indexer module turned on, and I've told it to index the fields I want. I've rebuilt the index several times, and made sure it was 100% complete. I've even looked in the database and confirmed that the words from those fields do appear in the search_index table. But when I search for one of those very same words, I just get a "no results" page. Searching for words that are in the node titles and taxonomy works fine; I can even search for words that appear in comments, and it will bring up the relevant node. It's just the CCK fields that aren't getting searched.

David Lesieur’s picture

Could it be that your fields are hidden from full node views? (in the fields' display settings, admin/content/types/mynodetype/display)

Hidden fields will cause the behavior you have described since their content won't show up in the full node index. However, Field Indexer still gives those fields their field-specific index entry because it doesn't check for field visibility.

Grantovich’s picture

Just checked, they're all set to Default in both Full and Teaser modes. I usually leave those settings alone, since I'm overriding everything with contemplates and panels anyway. Speaking of which, could that cause any problems? I hope not.

David Lesieur’s picture

I'm not sure whether Contemplate can interfere with indexing, but I'd be very surprised is Panels did. Can you test this with Contemplate disabled?

Grantovich’s picture

Disabled all my clever contemplates, reindexed, and... now it works fine. Go figure.

Of course, without those templates, my site layout is toast. The whole reason I wasn't displaying most of the CCK fields in the node body was because I pulled them into a "custom content" chunk in my Panels layout that resides elsewhere on the page. Would this issue be considered a flaw in the search mechanism? in Panels? in Contemplate? in anything?

David Lesieur’s picture

To me, this is not a flaw in Contemplate or Panels because the problem is more fundamental, in the node rendering mechanism. Nodes are always rendered in one of two modes: teaser or full. We need this to be expandable (e.g. indexing mode, RSS mode, print-friendly mode, JSON mode). This is a big issue being discussed for Drupal 7... Not much we can do for now, except helping with that issue.

In the meantime, I guess only a custom module could ensure that what you want to be indexed gets indexed regardless of your content templates.

Grantovich’s picture

To me it doesn't appear that the indexing is the problem; after all, even with the templates enabled, the fields have indeed been indexed, as I confirmed by looking at the search_index table. It seems more a question of the method used to do keyword searches. Is there no way to simply search both the node body and any indexed CCK fields as well?

David Lesieur’s picture

The keywords for sure appear in search_index, because Field Indexer adds them. If you double-check, you'll probably find that those keywords are only indexed with type = 'field_NN' (these are Field Indexer's entries). However, for the core search or Faceted Search's Anywhere search to find those keywords, they need to be indexed with type = 'node' (these are the core search entries, which won't be present when the keywords only occur in fields that are hidden from node views).

Grantovich’s picture

I guess what I'm asking for, then, is a way to do what I want with what's available right now, given that I don't have the luxury of waiting until Drupal 7 is released. This search module seems to be the only one that even gives me the option of searching CCK fields, so it's still the closest thing I have to a solution.

You mentioned the possibility of developing a custom module. Due to my circumstances, and the fact that I am not a competent PHP coder (much less a module developer), this would be an absolute last resort. I would be interested in hearing about any alternative search solutions that may exist, or any modifications that might be made to existing components to get the functionality I need.

One major limitation I'm working under is that the site will be on an isolated network, so anything that requires access to the internet (e.g. Google site search) is definitely not possible.

burtburtson’s picture

I almost have the opposite problem: I can search CCK-fields – no problem. But it seem that I can’t exclude the "anything"-option from my keyword-search. The button in the keyword-search-setting is greyed-out. This always gives me a couple of irrelevant search-results since I’m using this search on übercart-products. Any ideas? Thanks.

ahabman’s picture

I'm having same issue as burtburtson #11 above. Drupal 6.16, faceted_search 6.x-1.0-beta2

arski’s picture

hey there, have the same issues in my Drupal 6 with the latest dev release..

1. the "anywhere" checkbox is greyed out so I can't disable it
2. If I allow the user to select fields to search in, and he selects "Title" for example, nodes with the matching title will be found. However, if I disable "Provide field selector in the Keyword search block" then no nodes are ever found.. regardless if I select "anywhere" only, or the "Title" field too.. :(

help would be greatly appreciated!

PS. shouldn't the version of this report be adjusted to 6x? anyway.

brevity’s picture

Version: 5.x-1.0-beta4 » 6.x-1.0-beta2
Category: support » bug

Keyword search (also in "anywhere") does not search at all but returns the default list of all nodes -- search in "title", etc. it worked.

Compared to another similar (older/upgraded) site where general faceted keyword search works ...
- played around with luceneapi (disabled now, rebuilt index)
- played around with (cck,node) field indexer modules
- no "clean urls" enabled
- site lives in a subdirectory (eg host/dir?q=facetbrowse/results/searchterm )

Also ?q=search/node/searchterm works

Cheers

arski’s picture

Same issue here, this is quite annoying..

The keyword search works fine if I select some field, but it always displays a full list of nodes, regardless if I enter some term which should/not filter the results and if I use teaser view or Views view..

Any help would be greatly appreciated!
Cheers

arski’s picture

my issue turned out to be an FSRange one, fixed in #712372: Range search module eats up all search text

harings_rob’s picture

Subscribing,

i'm also having this issue, keyword search returns 0 results.