Shyli's Enterprise Search Platform Forum
Welcome Guest Active Topics | Log In | Register

New Topic Post Reply Tag as favorite
use navigation or modifier
Guest
#1 Posted : Wednesday, November 11, 2009 2:51:57 PM

Rank: Guest

Posts: 142
Points: 473
Hi

Anybody have a example to use the navigation or modifier to filter a query using the FAST api?

I did a project that do the search. And i get the navigator's and modifier's created in the view collection, but i don't know how to use this result.
shyli Offline
#2 Posted : Friday, November 13, 2009 3:42:24 PM

Rank: Administration


Posts: 48
Points: 144
Location: USA
Request you to become member...
Here is the code you are looking for...
Code:

private void PopulateResultNavigator(IQueryResult qr)
{                       

    if (qr.Navigators() != null && qr.NavigatorCount() > 0)
    {
    IEnumerator nav = ((System.Collections.ICollection)qr.Navigators()).GetEnumerator();               

    while (nav.MoveNext())
    {
        Com.FastSearch.Esp.Search.Result.INavigator navigator = (Com.FastSearch.Esp.Search.Result.INavigator)nav.Current;


       //Get following here
       //navigator.Name
       //
       //navigator.Type.ToString();
       //navigator.ModifierCount();

        System.Collections.ICollection modifiers = null;
        try
        {
        modifiers = navigator.Modifiers();
        }
        catch (Exception)
        { }
        if (modifiers != null && modifiers.Count > 0)
        {
        IEnumerator mod = modifiers.GetEnumerator();

        while (mod.MoveNext())
        {                           
            IModifier modifier = (IModifier)mod.Current;

            //Get Following here
            //modifier.Name;
            //modifier.Attribute
            //modifier.Value
            }

        }
        }                   
    }               
    }
}
ad.slaton Offline
#3 Posted : Tuesday, December 08, 2009 2:51:49 PM

Rank: Star Member

Posts: 6
Points: 18
Location: Atlanta
Hello,

I recently installed FAST on a clients server. The query is running and the results are showing but my navigators are not displaying. When I run the query with the HTTP interface the navigators show but they are not displaying with .NET API. Are there any suggestions?
Jonathan
#4 Posted : Tuesday, December 08, 2009 6:49:32 PM

Rank: Guest

Posts: 142
Points: 473
You need to set navigation enabled = true in search parameter
ad.slaton Offline
#5 Posted : Wednesday, December 09, 2009 6:56:08 PM

Rank: Star Member

Posts: 6
Points: 18
Location: Atlanta
Thank you for the help... I have another question. I have the navigatos displaying but my drill down query is not posting results. I used the code sample that is posted in a previous post above. Does anyone have a possible resolution?
shyli Offline
#6 Posted : Thursday, December 10, 2009 4:30:10 PM

Rank: Administration


Posts: 48
Points: 144
Location: USA
You need to use navigation searchParameter and pass the filterterm

Here is one example

Code:

Com.FastSearch.Esp.Search.Navigation.FilterTerm term = new Com.FastSearch.Esp.Search.Navigation.FilterTerm(string Name, string Val, bool plus)
//put plus as true so that your drill down parameter gets added
//As user drills down, keep on adding terms with space seperator in a different variable say filterterm like below

filterterms = filterterms + " " + term.AsString(true);
//Now add this filterterm to navigation search parameter
query.SetParameter(new SearchParameter("navigation", filterterms));


Hope this helps.
ad.slaton Offline
#7 Posted : Tuesday, December 15, 2009 1:20:14 PM

Rank: Star Member

Posts: 6
Points: 18
Location: Atlanta
Thank you! That was really helpful.
rajibkha Offline
#8 Posted : Tuesday, December 29, 2009 2:01:36 AM

Rank: Newbie


Posts: 2
Points: 6
Location: Singapore
Hi Shyli and All,

I am new to FAST and in this group. Is there any way to view the Navigation details
in FQL screen after executing the FQL? I am unable to view the Navigation details.
I tried Navigators to "On" in the Advanced Controls, but no luck.
Any help will be highly appreciated.

Thank you all.

Rajib Kha
sujithjoseph Offline
#9 Posted : Tuesday, December 29, 2009 3:40:36 AM

Rank: Advanced Member

Posts: 32
Points: 96
Location: CA / USA
You will need to populate the index profile fields based on which the navigators are created. If you see fields keywords, docdatetime, size etc populated in the search results, you should see navigators, if navigators are enabled for your search view and in the query parameter. Are you using QR server - 15100 query interface to execute the FQL. Pls copy paste the FQL used and the search UI url.
rajibkha Offline
#10 Posted : Tuesday, December 29, 2009 4:31:37 AM

Rank: Newbie


Posts: 2
Points: 6
Location: Singapore
Hi Sujith,

Thanks for your immediate response. I have already populated the index profile.
I can get all the field (left side) during in all type of search. But problem is - I am unable to see the right side of Navigations lists like (Timestamp(4), Companies(100), Locations(100) People(100), Keywords(100), while searching by "Contextual Search > FQL".

But this above Navigations list, I am able to see by Simple Search, Similarity Search,Fielded Search using FQL.

Thanks & Regards,

Rajib



sujithjoseph Offline
#11 Posted : Tuesday, December 29, 2009 10:21:02 PM

Rank: Advanced Member

Posts: 32
Points: 96
Location: CA / USA
From your reply, I assume that you are not getting the navigators displayed when you perform queries using FQL and you are seeing them while performing queries using Simple / Fielded Search. Check these
1) Try using FQL <compositefield>:"<queryterm>"
where compositefield is the composite field associated with the selected search profile which has got valid content in the index
2) Ensure that in Advanced Controls section in that page, next to SearchFeatured : label, Navigator drop down has 'On' as the value.

Thanks,
Sujith Joseph
Guest
#12 Posted : Tuesday, February 09, 2010 3:12:20 PM

Rank: Guest

Posts: 142
Points: 473
Is it possible to have a datetime navigator to display in the following format:

This month(n)
Last month(n)
Last 6 months(n)
6 months+(n)

I can not find anything in the documentation about this.
shyli Offline
#13 Posted : Tuesday, February 09, 2010 10:36:21 PM

Rank: Administration


Posts: 48
Points: 144
Location: USA
You need to do a fielded search on datetime field.
Something like

Quote:
query=and(string("test",mode="simpleany",annotation_class="user"),docdatetime:[2009-10-06T04:00:00;2010-02-09T05:00:00], filter(meta.collection........
Guest
#14 Posted : Monday, February 22, 2010 5:14:22 PM

Rank: Guest

Posts: 142
Points: 473
Is there a way to make the navigators display (if they have modifiers) in a set order in the .NET interface? I am curious to know.
shyli Offline
#15 Posted : Monday, February 22, 2010 7:13:22 PM

Rank: Administration


Posts: 48
Points: 144
Location: USA
yes it is possible. we are doing it.
You need to get all the navigators first in some generic list and then sort it the way you want.

Guest
#16 Posted : Tuesday, February 23, 2010 10:22:47 AM

Rank: Guest

Posts: 142
Points: 473
How is the score of navigators determined by the fast search engine?
Quick Reply Show Quick Reply
Users browsing this topic
Guest
New Topic Post Reply Tag as favorite
Forum Jump  
You can post new topics in this forum.
You can reply to topics in this forum.
You can delete your posts in this forum.
You can edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.