I have read through many posts and have not found a clear answer for defining search criteria, nor is it in the User manual.
Here are the steps I have taken to set up my search...
Step 1: Create a Search index, and define what will be indexed - i.e. All pages, News, etc.
Step 2: Open App_Data -> Search -> IndexName -> fieldsInfoProvider.xml
Step 3: Define your fields and save
Step 4: Go back to Seach index in Admin and click on "Start Indexing" - this will update the index
Step 5: Create a Search Results page and drop a "Search Results" control within the content placeholder
Step 6: Add the Search box to the page (this can be added direclty to a user control that resides within the master page (Template) - I use this method)
Step 7: Launch the site and test the Search
Everything on the page is showing up - nav, header, footer
Step 3 above is what I would like clarification on... perhaps some solid examples of how to define what will be indexed.
I have a main master page (with header, footer, and nav) and child master pages (with varying content placeholders).
How can I set the filters so that only specified tags are searched?
Within a user control there is a <div id="nav">
To exclude this I can put the following in my fieldsinfoProvider.xml:
|<field name="nav" weight="-1" filterTag="div" filterAttributes="id:nav" indexAttribute="" />
Note the weight is -1 to omit.
However, I want to be able to index only specific elements - like divs and contentplaceholders.
|<field name="mycontent" weight="1" filterTag="div" filterAttributes="id:mydiv" indexAttribute="content" />
1. Can you tell it what tags to explicitly target for indexing? - is the example above incorrect?
2. If you can, how would you identify a ContentPlaceholder? - using the runtime div id?
In my scenario it would be easier to define a few content areas rather than omit a bunch of other elements.
It looks like you can filter OUT elements using filters, but cannot define what parts to filter IN.