Customizing "Search Page" in Document Explorer 8

Hello,

if you use the search functionality in Document Explorer, you have the possibility to restrict the search by selecting attributes from three categories: Language, Technology, Content Type.

First question:

Is it possible to add a fourth category with a number of different attributes Which modifications do I have to make

Second question:

If first solution is not possible, can i extend one of the existing categories with a new attribute E.g. adding "My Language" to the "Language" category would be sufficient.

Thanks in advance for your answers.

With kind regards,

Florian



Answer this question

Customizing "Search Page" in Document Explorer 8

  • Roland H

    Hello,

    I have a couple of additional questions.

    The first relates to the the location of the XML filter. I would prefer to install the filter within our products directory structure. Is it acceptable to do this If so, how do I properly register the file

    Also, I was wondering if a schema exists for the search filter XML. I would be nice to know what the valid elements and attributes are.

    Thanks in advance,

    Earl Seugling
    Documentation Manager
    AppForge, Inc.


  • windyweather

    Hello again,

    I finally solved the problem.

    The thing I haven't considered, was the bracketing.

    A local search string of the form:

    ("product"="MyProduct") AND ("key"="WordA") <-- WordA-Filter

    ("product"="MyProduct") AND ("key"="WordB") <-- WordB-Filter

    gave me the above described search behaviour (5 Results).

    If I now set brackets around the complete expression, the expected behaviour of 15 search results will appaer:

    (("product"="MyProduct") AND ("key"="WordA")) <-- WordA-Filter

    (("product"="MyProduct") AND ("key"="WordB")) <-- WordB-Filter

    So I think AND and OR are weighted different. Do you have any findings concerning this manner

    Thank you,

    With kind regards,

    Florian


  • ericjn

    I am surprised that it didn't result in 15 hits. Were the search term same in all three searches Filters in one category behave like "OR" filter. The "AND" behavior occurs across categories (note that it doesnt occur across Language and Technology as they are considered one big bucket). Doing an "AND" based on different values of an attribute is an odd scenario. People are typically interested in one particular value for an attribute. They will add another value to get a "similar/portable" result. For example, user develops in C# and ideally would like a topic with C# attribute. She/he will add "VB" to get higher (more relevant) numbers of hit and most of the times, the topics/concepts are applicable to her/his scenario.

    Note that there is "Include partial matches in local search results" option under Tools->Options->Help->General that affects the "AND" operation based on search terms.

    --
    Regards,
    >Saurabh



  • BioSlayer

    You can do two by creating a search filter. A sample search filter will looke like this.

    < xml version="1.0" encoding="utf-8" >
    <
    SearchFilter xmlns="http://schemas.microsoft.com/VisualStudio/2004/08/Help/SearchFilter" Version="0.1.0.0">
        <
    FilterAttribute>
            <
    Id>Language</Id>
            <
    Name>Language</Name>
            <
    FilterValue>
                <
    Id>MyLang</Id>
                <
    Name>My Language</Name>
                <
    Meaning>
                    <
    LocalFilterString>("DocSet"="MyLang")</LocalFilterString
                    <
    OnlineFilterString
                        <![CDATA[

                            <StringTest Name="ExtendedProperty" Operator="Equals" Value="MyLang" ExtendedProperty="DocSet"/>
                        ]]> 
                    </
    OnlineFilterString
                </
    Meaning>
            </
    FilterValue>
        </
    FilterAttribute>
    </
    SearchFilter>

    Save this filter in an xml file (say MyLang.xml). Copy this filter into "%CommonProgramFiles%\\Microsoft Shared\VS Help Data\8.0\Filters\1033". Then register this search filter so that VS will know about its existence. You can do so by running a reg command similar to the following.

    reg add HKLM\Software\Microsoft\VisualStudio\8.0\Help\VisibleFilters /v MyLang /t REG_DWORD /d 1

    This should make your language appear in the Laungages dropdown.

    "One" is also possible. We dont recommend it. The reason being that it will act as an "And" filter on the other filter categories (lang/tech/content type). If the search provider doesnt drop unknown filter type from the "And" query, it will result in 0 results.

    --
    Regards,
    Saurabh

    VS Platform Dev.



  • merivel

    Hello,

    thank you very much for replying. I sucessfully integrated my own language in the search page.

    But still more problems to go. I read in the forums, checking all or none filters from a category will disable the filter (Result: all). To enable search in my language only, I introduced a dummy filter option, that has to be unchecked to enable filtering in my language only. (The local/remote Filter String is empty). No problem yet - but i don't understand the filter rules.

    Here's a little example, I have 2 keywords: Key=WordA and Key=WordB. Each page has either Key=WordA or Key=WordB as an attribute in its html source. There are 15 pages, 10 with WordA und 5 with WordB. So these parts are disjoint.

    I have 2 XML Filters. One that filters only the WordA-Files and the other filtering WordB-Files.

    I searched 3 times. First with WordA-Filter -> 10 Results. Second with WordB-Filter -> 5 Results. Third Word-A AND Word-B Filter -> 5 Results.

    Can anybody explain the search-mechansism to me, how the different filter options are affiliated with each other and how do I enable a logical AND connection

    With kind regards,

    Florian


  • www.ilkon.com

    Hi,

    I've followed the instructions but just can't get it to work! I created the xml and updated the registry but the filter does not show in the filter list.

    Do you need to do anything special to the help collection or help installer to make it work Maybe mess around with orca like in the good old days

    "DocSet"="MyHelp" ... What do I need to enter in place of MyHelp Is it the help project or namespace or ...

    I use HelpStudio Lite to create the help and VS.NET 2005 to create the installer. The help appears in the content and search and F1 work fine.

    Thanks for enlighting me.


  • gyurisc

    I have posted the xsd at

    http://blogs.msdn.com/saurabhjain/articles/580980.aspx

    --
    Regards,
    Saurabh



  • SP Steve

    It is not possible to change the location fo the xml filter files. Current architecture requires them to be installed in the common location.

    Current xsd contains many optional elements that can be confusing. I will cleanup the xsd so that it easier to understand and will post it.

    We are working on documenting all this information and will eventually become part of the Visual Studio SDK.

    --
    Regards,
    Saurabh



  • OlyJim

    Thanks Saurabh. I'll keep an eye out for the schema.

    - Earl


  • Customizing "Search Page" in Document Explorer 8