locked
Search Only For DisplayName of StorageFile RRS feed

  • Question

  • Hello,

    Iam Implementing Search Functionality in My App When user provide query I need to show the images which have same query as Displayname but when I do using the following code I got images the query matchs the File Path also but I don't need it I need to search only for match displayname. Please Help Me

                    var queryOptions1 = new QueryOptions();
                    queryOptions1.FolderDepth = FolderDepth.Deep;
                    queryOptions1.IndexerOption = IndexerOption.UseIndexerWhenAvailable;
                    queryOptions1.UserSearchFilter = SearchQuery;


    Santana George

    Wednesday, March 27, 2013 7:53 AM

Answers

  • try something like queryOptions1.ApplicationSearchFilter = "name:insert-text-to-match";

    where insert-text-to-match is your search criteria


    http://lunarfrog.com/blog/

    • Marked as answer by Santana George Wednesday, March 27, 2013 12:07 PM
    Wednesday, March 27, 2013 12:02 PM

All replies

  • What is your SearchQuery?

    http://lunarfrog.com/blog/

    Wednesday, March 27, 2013 11:30 AM
  • it's user's name

    Santana George

    Wednesday, March 27, 2013 11:55 AM
  • try something like queryOptions1.ApplicationSearchFilter = "name:insert-text-to-match";

    where insert-text-to-match is your search criteria


    http://lunarfrog.com/blog/

    • Marked as answer by Santana George Wednesday, March 27, 2013 12:07 PM
    Wednesday, March 27, 2013 12:02 PM
  • Thanks it works!

    Santana George

    Wednesday, March 27, 2013 12:07 PM