RegExp performance for returning contextual search results

Hello,
I have a search results page on which I want to display search term results in context ... the search term plus 15 words on either side.
I've written a function that is working (pasted below). Essentially, it receives as string and then I use regular expressions plus an ArrayList to determine the substing to return. Performance is ok, but I'm wondering if there's a better way to tackle this problem.
Anyone have a suggestion?
Thanks
  public static String returnSnippet(String xmlText, int numberOfWords)
    Pattern myPattern;
    Matcher myMatcher;   
    // Move this out so it's passed in since this is a utility class?
    String[] patternArray = {
      "<chapter-title(.*?)</chapter-title>",
      "<subject-title(.*?)</subject-title>",
      "<resource-metadata>(.*?)</resource-metadata>",
      "<children>(.*?)</children>",
      "<child(.*?)</child>",
      "<a-head(.*?)</a-head>",
      "<b-head(.*?)</b-head>",
      "<lrh>(.*?)</lrh>",
      "<rrh>(.*?)</rrh>",
      "<head(.*?)</head>",
      "<titlegroup(.*?)</titlegroup>",
      "<para role(.*?)</para>",
      "<contributor(.*?)</contributor>",
      "<author(.*?)</author>",
      "<fmname(.*?)</fmname>",
      "<lname(.*?)</lname>",
      "<(.|\n)+?>"
    // Do these two first
    myPattern = Pattern.compile("<hit (.*?)>");
    myMatcher = myPattern.matcher(xmlText);
    xmlText = myMatcher.replaceAll("[hit]");
    myPattern = Pattern.compile("</hit>");
    myMatcher = myPattern.matcher(xmlText);
    xmlText = myMatcher.replaceAll("[/hit]");
    for (int i = 0; i < patternArray.length; i++)
      myPattern = Pattern.compile(patternArray);
myMatcher = myPattern.matcher(xmlText);
xmlText = myMatcher.replaceAll("");
// Add the logic to count words before and after here
// See RegexTestHarness.java in C:\j2sdk1.4.2_11\lib on my machine for notes / test version
myPattern = Pattern.compile("\\[hit\\].*?\\[hit\\]");
myMatcher = myPattern.matcher(xmlText);
if(myMatcher.find()) // Using if captures the first instance only; using while will loop through them all
int hitStart = myMatcher.start();
int hitEnd = myMatcher.end();
myPattern = Pattern.compile("\\s");
myMatcher = myPattern.matcher(xmlText);
ArrayList spaceArray = new ArrayList(100);
while(myMatcher.find())
spaceArray.add(new Integer(myMatcher.start())); // ListArray.add() expects and Object, but int is a primitive type, so create an Integer object
arrayforloop: for(int i=0; i < spaceArray.size(); i++)
When the value of the number (the index of the "space" hit) is greater than or equal to the value of the hitStart
(the index of the "[hit]" start), count backwards and forwards to get the index values for spliting the string.
if( ((Integer)spaceArray.get(i)).intValue() >= hitStart ) // Going from Object -> Integer -> int
int wordIndexStart = ( ( i - numberOfWords ) <= 0 ) ? 0 : i - numberOfWords; // These two get the locations in the array
int wordIndexEnd = ( ( i + numberOfWords ) >= spaceArray.size() ) ? spaceArray.size() : i + numberOfWords;
int substringStart = (wordIndexStart == 0) ? 0 : ((Integer)spaceArray.get(wordIndexStart)).intValue(); // These two get the values of the locations in the array
int substringEnd = ( (Integer)spaceArray.get(wordIndexEnd) ).intValue();
xmlText = xmlText.substring(substringStart, substringEnd);
break arrayforloop;
else
xmlText = "";
// Do these two last
myPattern = Pattern.compile("\\[hit\\]");
myMatcher = myPattern.matcher(xmlText);
xmlText = myMatcher.replaceAll("<span class=\"sr-hit\">");
myPattern = Pattern.compile("\\[hit\\]");
myMatcher = myPattern.matcher(xmlText);
xmlText = myMatcher.replaceAll("</span>");
return xmlText;

Wow. Let me ask you if this is what you meant (code below).
It's shaved about 200 milliseconds off the resopnse time. I went from 600-800 milliseconds down to 400-600 to process a page of results. That's a fantastic improvement.
  private static Pattern regex_chaptertitle = Pattern.compile("<chapter-title(.*?)</chapter-title>");
  private static Pattern regex_subjecttitle = Pattern.compile("<subject-title(.*?)</subject-title>");
  private static Pattern regex_resourcemetadata = Pattern.compile("<resource-metadata>(.*?)</resource-metadata>");
  private static Pattern regex_children = Pattern.compile("<children>(.*?)</children>");
  private static Pattern regex_child = Pattern.compile("<child(.*?)</child>");
  private static Pattern regex_ahead = Pattern.compile("<a-head(.*?)</a-head>");
  private static Pattern regex_bhead = Pattern.compile("<b-head(.*?)</b-head>");
  private static Pattern regex_lrh = Pattern.compile("<lrh>(.*?)</lrh>");
  private static Pattern regex_rrh = Pattern.compile("<rrh>(.*?)</rrh>");
  private static Pattern regex_head = Pattern.compile("<head(.*?)</head>");
  private static Pattern regex_titlegroup = Pattern.compile("<titlegroup(.*?)</titlegroup>");
  private static Pattern regex_pararole = Pattern.compile("<para role(.*?)</para>");
  private static Pattern regex_contributor = Pattern.compile("<contributor(.*?)</contributor>");
  private static Pattern regex_author = Pattern.compile("<author(.*?)</author>");
  private static Pattern regex_fname = Pattern.compile("<fmname(.*?)</fmname>");
  private static Pattern regex_lname = Pattern.compile("<lname(.*?)</lname>");
  private static Pattern regex_alltags = Pattern.compile("<(.|\n)+?>");
  public static String returnSnippet(String xmlText, int numberOfWords)
    int wordIndexStart;
    int wordIndexEnd;
    int substringStart;
    int substringEnd;
    Pattern myPattern;
    Matcher myMatcher;       
    // Do these two first
    myPattern = Pattern.compile("<ixiahit (.*?)>");
    myMatcher = myPattern.matcher(xmlText);
    xmlText = myMatcher.replaceAll("[ixiahit]");
    myPattern = Pattern.compile("</ixiahit>");
    myMatcher = myPattern.matcher(xmlText);
    xmlText = myMatcher.replaceAll("[/ixiahit]");
    myMatcher = regex_chaptertitle.matcher(xmlText);
    xmlText = myMatcher.replaceAll("");
    myMatcher = regex_subjecttitle.matcher(xmlText);
    xmlText = myMatcher.replaceAll("");
    myMatcher = regex_resourcemetadata.matcher(xmlText);
    xmlText = myMatcher.replaceAll("");
    myMatcher = regex_children.matcher(xmlText);
    xmlText = myMatcher.replaceAll("");
    myMatcher = regex_child.matcher(xmlText);
    xmlText = myMatcher.replaceAll("");
    myMatcher = regex_ahead.matcher(xmlText);
    xmlText = myMatcher.replaceAll("");
    myMatcher = regex_bhead.matcher(xmlText);
    xmlText = myMatcher.replaceAll("");
    myMatcher = regex_lrh.matcher(xmlText);
    xmlText = myMatcher.replaceAll("");
    myMatcher = regex_rrh.matcher(xmlText);
    xmlText = myMatcher.replaceAll("");
    myMatcher = regex_head.matcher(xmlText);
    xmlText = myMatcher.replaceAll("");
    myMatcher = regex_titlegroup.matcher(xmlText);
    xmlText = myMatcher.replaceAll("");
    myMatcher = regex_pararole.matcher(xmlText);
    xmlText = myMatcher.replaceAll("");
    myMatcher = regex_contributor.matcher(xmlText);
    xmlText = myMatcher.replaceAll("");
    myMatcher = regex_author.matcher(xmlText);
    xmlText = myMatcher.replaceAll("");
    myMatcher = regex_fname.matcher(xmlText);
    xmlText = myMatcher.replaceAll("");
    myMatcher = regex_lname.matcher(xmlText);
    xmlText = myMatcher.replaceAll("");
    myMatcher = regex_alltags.matcher(xmlText);
    xmlText = myMatcher.replaceAll("");
    // Add the logic to count words before and after here
    // See RegexTestHarness.java in C:\j2sdk1.4.2_11\lib on my machine for notes / test version
    myPattern = Pattern.compile("\\[ixiahit\\].*?\\[/ixiahit\\]");
    myMatcher = myPattern.matcher(xmlText);
    if(myMatcher.find()) // Using if captures the first instance only; using while will loop through them all
      int hitStart = myMatcher.start();
      int hitEnd = myMatcher.end();
      myPattern = Pattern.compile("\\s");
      myMatcher = myPattern.matcher(xmlText);
      ArrayList spaceArray = new ArrayList(100);
      while(myMatcher.find())
        spaceArray.add(new Integer(myMatcher.start())); // ListArray.add() expects and Object, but int is a primitive type, so create an Integer object       
      arrayforloop: for(int i=0; i < spaceArray.size(); i++)
        When the value of the number (the index of the "space" hit) is greater than or equal to the value of the hitStart
        (the index of the "[ixiahit]" start), count backwards and forwards to get the index values for spliting the string.
        if( ((Integer)spaceArray.get(i)).intValue() >= hitStart ) // Going from Object -> Integer -> int
          wordIndexStart = ( ( i - numberOfWords ) <= 0 ) ? 0 : i - numberOfWords; // These two get the locations in the array
          wordIndexEnd = ( ( i + numberOfWords ) >= spaceArray.size() ) ? spaceArray.size() : i + numberOfWords;
          substringStart = (wordIndexStart == 0) ? 0 : ((Integer)spaceArray.get(wordIndexStart)).intValue(); // These two get the values of the locations in the array
          substringEnd = ( (Integer)spaceArray.get(wordIndexEnd) ).intValue();
          xmlText = xmlText.substring(substringStart, substringEnd);         
          break arrayforloop;
    else
      xmlText = "";
    // Do these two last
    myPattern = Pattern.compile("\\[ixiahit\\]");
    myMatcher = myPattern.matcher(xmlText);
    xmlText = myMatcher.replaceAll("<span class=\"sr-hit\">");
    myPattern = Pattern.compile("\\[/ixiahit\\]");
    myMatcher = myPattern.matcher(xmlText);
    xmlText = myMatcher.replaceAll("</span>");
    return xmlText;
  }

Similar Messages

  • Cortana return Bing search result instead of "chit chat".

    Issue: CORTANA did not do chit chat but instead returns Bing search results.
    Examples: "Who's your daddy", "Sing a song", "Tell a joke"
    Settings:

    settings:
    - language: English(United States)
    - region: United States, English ( United States)
    -speech: English (United States)
    So you appear to be developing an app or you wouldn't have posted in this
    Windows and Windows phone apps , Windows Phone Dev Center > Dev Center App forum.
    I don't get the issue. You don't provide any code for your application or what your application is supposed to do with regard to
    CORTANA. So why shouldn't CORTANA return BING search results rather than some kind of Chat thing?
    La vida loca

  • **All attributes not returned in search result**

    hi everyone,
    I urgently need some help on ldap search.
    I have a directory structure something like
    c=xyz
    +-ou=x
    ------+-ou=1
    ------+-ou=2
    ------+-ou=3
    ------+-cn=crl here
    ------+-ou=4
    now when i am searching this node and displaying all "ou" under
    "ou=x,c=xyz" the search is not showing the nodes after the "cn",which
    is in-between the "ou"s
    i am using jsp, jndi, critical path directory server
    ================some code i am using for the search
    DirContext ctx=new InitialDirContext(env);
    SearchControls constraints = new SearchControls();
    constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
    constraints.setReturningObjFlag(true);
    NamingEnumeration results=ctx.search
    (SearchBase,"objectClass=*",constraints);
    while(results!=null && results.hasMore())          
    SearchResult sr = (SearchResult) results.next();
    attrs=sr.getAttributes();
    attr= attrs.get("ou");
    %>
    <hr>attrs: <%=attrs.toString()%>
    <br>Cert Name: <%=attr.get()%>
    <%     
    }// end of while
    ================
    the code above returns only
    ou=1
    ou=2
    ou=3
    But it is not returning
    "ou=4", which comes after "cn=crl.."
    thankyou in advance for your help
    from vikram.

    Hi Sigge,
    as i know, when we do crawl, it is based on the crawl scope, and it should crawl all the web applications.
    http://technet.microsoft.com/en-us/library/dn535606(v=office.15).aspx#BKMK_CrawlDefaultZone
    perhaps you can check for the managed property rules, and make sure the managed property is listed, and try to change to searchable.
    references:
    http://blogs.technet.com/b/tothesharepoint/archive/2013/11/11/how-to-add-refiners-to-your-search-results-page-for-sharepoint-2013.aspx
    http://technet.microsoft.com/en-us/library/jj679902(v=office.15).aspx
    http://sharepoint.stackexchange.com/questions/86556/problem-using-sharepoint-2013-search-to-filter-by-managed-property
    http://www.spsdemo.com/lists/code/psview.aspx?List=e8ea501a-fd9d-4dae-9626-808a49d34dc8&ID=21&Web=b5d35eb4-a015-4614-9ff6-b860c3d3d1af
    Regards,
    Aries
    Microsoft Online Community Support
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Send an alert with search query word if nothing return on search result??

    Hi All,
    is it possible to send an alerts to specific person, when end-users will not find any results on specific query? i know sharepoint has Search alerts, but i am looking to send an alert, if they dont find anything in search results.
    Thanks in advanced!

    Not possible out-of-the-box.
    There are search usage reports for reviewing and optimizing the results... but nothing like what you're asking for... Nor do I think such a feature would ever be added... too much potential for misuse (no results found for "JaneDoe should be fired") or overwhelming
    amounts of useless information (2000 emails indicating that "NotARealWord" returned no results).
    As a developer, it is POSSIBLE with custom development... but I'd still advise against it.
    Scott Brickey
    MCTS, MCPD, MCITP
    www.sbrickey.com
    Strategic Data Systems - for all your SharePoint needs

  • How to determine target for links in search results

    I've created an autoquery custom search portlet.
    The search results are by default showed is this portlet.
    The text items which are found display a link to their content.
    When clicked, the content is showed in a style different from the page on which the portlet was placed, and at full screen.
    How can I force the content to display on a page of which I can determine the style and layout?
    Thanks,
    Ton

    Unfortunately there's no way to do this directly at the moment although this functionality is planned for a future release.
    However, its possible to acheive the same effect by using procedures associated with the Text item type.
    To learn more about this, navigate to the Shared Objects page group, click on "Item Types" and edit the "Text" item type. Click on the "Procedures" tab. The help on the screen has information about creating custom procedures to render information associated with the item.
    Also see a Body text in custom search results to this forum.

  • Changing View Options for a Finder SEARCH Results

    I want to add SIZE to the Finder window that is generated from a <command> Find.
    I cannot add anything to the standard Name/Kind/Last Opened. I want to add SIZE to the search results window. When I choose View Options, the options window says:
    There are no view options for the Searching This Mac window.

    corbey wrote:
    I want to add SIZE to the search results window.
    In normal Finder windows you can select View>view options>*Calculate all sizes*
    In Finder search window results, this has been hobbled. Here is the work around:
    http://hints.macworld.com/article.php?story=2009083113534843
    Message was edited by: leroydouglas

  • Return custom search results from a list

    Hello all!
    I'm currently on a Windows 7 migration project where we need a custom search function for our SP2010 page.
    Basically, the user will enter there machine barcode into the search box and query information from a list. This query will only return information relevant to that users machine barcode. For example, the user searches there barcode and the return results
    ONLY displays information for that user/barcode, information such as delivery date, delivery location, migration POC, etc..
    What is the best approach to this scenario?
    I'd like to do the least amount of custom coding as possible aka not using Visual basics.
    Thanks in advance!

    If you create a custom column, probably Managed Metadata, called Machine number, you can then search for items in hte list which have that value.
    This would work in both a search center, if you were to map that column to become a mapped property and then add it to the refiners bar, and on the list using metadata navigation in list settings > advanced.
    Zero code.

  • Highly frustrated with Outlook 2013 Search People box bugs - Multiple Name Results for Same Contact & Inconsistent Results

    The Outlook 2013 "Search People" box does not function properly. It frequently displays incorrect results or a mess of duplicate results. I've reported previous issues about this and consolidating my posts into one (with screenshots this
    time). Hopefully this message will be forwarded to or seen by the Outlook programmers. It really needs to be fixed.
    Outlook 2010 and other prior versions worked perfectly. You search for name, you get ONE result with the info you're looking for. FAST AND EASY. But with Outlook 2013 Microsoft has created a heck of a mess resulting in huge frustration and productivity loss
    with such simple but important tasks.
    I have hundreds of contacts stored in my Outlook address book, and they all have COMPLETE contact info added. 
    One major issue that I'm experiencing in the new Outlook 2013 is that I now get average of 4 or more duplicate name results appearing for the same contact. And each result contains different and incomplete contact info, making it impossible for me to quickly
    find the basic info I'm looking for. The cause of this issue is that Outlook 2013 now provides results from not only your local address book(s), but it also shows results based  on your email history and social media accounts setup.
    And there's no way to turn this off, or at least specify what folders and/or accounts the People Search box should use.
    To make matters worse, the Microsoft developers conveniently forgot to add some form of an indicator (like a small icon besides each name result in the list)  that clearly indicates what result is from what source. So you must manually click on each
    result one at a time and repeat the search until you locate the correct one.
    For one specific example, I have a contact stored in my local address book called
    Infusionsoft. When I type "Infusionsoft" in the People Search box to quickly find a phone number, Outlook  2013 shows me 7 results with the same name. See the screenshot below:
    As you can see in the screenshot above, every result just says "Infusionsoft", so I have to manually click on each name result one at a time and repeat the process until I find the correct one from my address book. This same thing happens with other
    random contacts.
    From what I can tell, Outlook is pulling results based on  based on recent emails I've received from different people with "@infusionsoft.com" in their email address. So the first result shows "[email protected]" (just the email
    address), the second result shows "[email protected]", the third result shows "[email protected]" and so forth. I don't want Outlook to show all of that. I just want what's in my address book!
    And you would think that the last result would be the correct one from my address book, but no. Sometimes its the 5th result, and other times it's the 3rd or 7th result. So there's no freaking order of things here.
    We simply need the ability to turn off searching of email history and other accounts when using the People Search box. Problem fixed.
    (And please don't tell me that I need to "link" every incorrect result to one main contact. You shouldn't expect everyone to have to tediously link any and all results that appear to a record. ESPECIALLY when 5+ results for each contact appear regularly.)
    ISSUE 2: Some names must be typed in a different way for the Search People to locate them
    Another big issue I'm having with the Search People box is that some name searches don’t show the correct result, unless I search for their names in a different way.
    For one specific example, I have a contact stored in my address book named "Dave Johnson". When I type "Dave Johnson" in the Search People box, one result appears, but it's just his email address, only. It's not the result that's stored in my Outlook address
    book with his phone number, addresses, etc. Screen shot below:
    If I type in Dave's name reverse order (Johnson Dave),  no results are found at all.
    Now if I just type in just"Johnson" all by itself, it finds Dave's correct result (the one stored in my Outlook Address Book). Along with everybody else that has "Johnson" in their name (see screenshot below)...
    I double-checked how I have Dave's name programed in my address book, and it's in there as "Dave Johnson" for both the Full Name and File As fields. 
    Also, the name order shouldn't make any difference when using the People Search Box anyway. Sometimes I can find people by Last Name, First Name or First Name, Last Name. Only with random contacts does it get difficult finding  their info and
    I have to do strange things like this to find them from the People Search box.
    ISSUE 3: Some Search People results only yield an email address only.
    For other random contacts, some search results only yield an email address with no other contact details. But I can open the persons contact card from the address book manually, with the same email address shown! Screenshot below...
    In the screenshot above, I have outlined the Search People box results in red, and the Address Book results in green. You can clearly see that "Robert White" is a contact stored in my local address book with full contact details, but the Search People result
    only shows his email address! Again, it's not consitent. It's hit or miss with different people.
    ISSUE 4: Some results just don't appear at all, but they are in the address book
    Another issue I'm experiencing with the People Search Box is that some people simply  cannot be found. But I can see their contact info just fine if I click on the "People" tab down at the bottom of the page and type in their name in the "Search Contacts"
    field. Why can't the People Search box find certain people? I opened up their contact details and cannot find a single thing  that would prevent them from showing up in results.
    These are clearly serious bugs that need to be fixed. And I'm shocked as to how this got missed--or ignored during alpha and beta testing. I see the "idea" behind the developers having the Search People box search everything outside of the
    address book, but in real world application this causes a heck of a lot of problems & confusion, and it needs to be fixed ASAP.
    For technical details, I have Outlook 2013 running on two computers using hosted Exchange 2010. One system is Windows 7 and other is Windows 8. The same problems occur on BOTH computers. As far as my Outlook account setup, I have all contacts stored in the
    main address book (no sub-folders or other folders).
    Can someone help communicate this message to the Outlook developers??? The "Frown" button limits me to 100 characters and one image. There's no way I can communicate this level of detail and steps to duplicate in 100 characters!

    Thanks for your reply.
    1) The instant search boxes in each individual page work just fine. If I am on the People page and type in a name in the "Search Contacts" field, it searches my contacts and displays the results that I want. But I should not have to leave whatever screen
    I'm in to find people now. In Outlook 2010 and earlier versions, I could be on the calendar page and then search for a contact without clicking off the calendar completely. For productivity-sake, it's a huge waste of time and hassle now.
    2) I'm familiar with how contact linking works, and quite frankly it's a huge mess in general. I NEVER create multiple contacts for the same person. I get that Outlook 2013 get confused now when it detects a LinkedIn or Facebook account for the same person
    already in my Outlook address book, but we need to have options that allow us to turn off results from some or all social networks. This is a big part of the problem.
    Think about it this way - The average person has 150+ LinkedIn connections, and more for Facebook. Many people today have accounts for both and they are setup with the same email address. When Outlook 2013 has to scan all the networks IN ADDITION to your
    local address book(s), it's a no brainer that it can get very confused trying to display results.
    Another big part of the problem is that Outlooks new search system also scans your email history. I receive emails from people who use multiple email addresses, or emails from companies with multiple reps or ticket systems that send you a unique
    ticket ID # ending in the same email address domain. Now Outlook displays people search results based on everything under the sun in my email history. This is beyond frustrating (see my "Infusionsoft" screenshot above in the first post).
    Again, I want to stress that for the search examples I referenced, I only have one entry in my Outlook address book for each person. And that's all I want to find when I search for people--what's already in my own address book! 
    In summary:
    We need an OPTION to turn off searching external networks when using the People Search box
    We need an option to tell Outlook to not scan email history for people search results (I think this needs to be disabled entirely actually. It's not helpful at all)
    There should be a fixed priority for displaying people search results, with local address book results FIRST, followed by social network results.
    There should be a clear icon/indicator next to each result that gives you a clue as to where the result is coming from. Your address book? Facebook? LinkedIn? We should not need to click on each result to get a hint as to where it's coming from.
    Work out the bugs in general with the new search system.
    One other thing that I didn't mention is that the Search People box also shows results for people I'm not even "friends" or connected with on the different social networks. But I've noticed that some people use the same email address for those networks that
    I already have programmed for them in my address book, which is why Outlook sometimes shows me these results. Does that make sense?
    I'll try rebuilding the index, but after testing Outlook 2013 on 3 different machines so far and seeing the same results (all slightly different results on each machine and very inconsistent), I doubt this will address the issue.

  • OIM 11g r1 custom field in simple user search result

    Good morning,
    i need to visualize a custom field in the OIM simple user search result table. At the moment, when a simple user search is performed, the returned attribute is only the "Display Name".
    For the advanced user search result table, is possible to add other fields modifying the Search Results table configuration in Advanced->User configuration->Search Configuration.
    How can i do the same the for simple user search result?
    Thank you.

    Yes, i tried to add my custom attribute to both Simple and Adv search result table, but without luck. Only Display Name column attribute is shown when a simple search is performed.

  • How to hide part of search results to particular users?

    Hi,
    Is it possible to hide part of search results to particular users? If it possible can you please tell how to implement? 
    Thanks, Chinnu

    Hi,
    According to your post, my understanding is that you wanted to hide part of search results to particular users.
    You can use the security trimming to achieve it.
    By default, Enterprise Search results are trimmed at query time, based on the identity of the user who submitted the query.
    When results are returned for a user's search, the Query engine performs an access check for the user's identity against the security descriptor stored in the content index for each item in the search results. The Query engine then removes any items in the
    search results that the user does not have access to, so that the user never sees these results.
    SharePoint uses the access control list (ACL) associated with each document to trim out query results that users have no permission to view,
    but the default trimming provided by SharePoint (out-of-box trimming) may not always be adequate to meet data security needs.
    In that case, you can custom the security trimming to meet your requirement.
    There are some articles for your reference.
    Trim SharePoint Search Results for Better Security
    http://msdn.microsoft.com/en-us/magazine/ff796226.aspx
    Writing a Custom Security Trimmer for SharePoint Server Search
    http://msdn.microsoft.com/en-us/library/ee819930(v=office.14).aspx
    Walkthrough: Using a Custom Security Trimmer for SharePoint Server Search Results
    http://msdn.microsoft.com/en-us/library/office/ee819923(v=office.14).aspx
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • CS5 Photoshop Offline Help No Search Result Malfunction

    In summary the Adobe Community Help application or the "Launch Help in Browser" functions wont return any search results for the Adobe Photoshop CS5 OFFLINE reference.
    I use my main design machine off the net. It's not often I reach for the help text, but I got a wierd problem when I did. I'm bang up to date with all CS5 updates and all the help content for CS5 has been downloaded and is flagged correctly as local and is up to date. (I've even tried unticking all the local CS5 help refferences in the options and re-downloading them).
    If I search for say "brush" in the PS help, with the option "Local" selected, I get NO results! (and yet the help text / manual is clearly visible in the right hand pane of the "Adobe Community Help" application). If I try to use the "Online" option, that has no problem returning results.
    Q: Why doesn't Adobe Community Help return ANY search results for ANY query searched on the PS5 local help?
    The local search works (or appears to) for the other local refferences like Fireworks or Encore. Just not Photoshop.

    Hi Zeno, thanks for you reply, but I don't think you fully read my issue.
    I'll post you some images and then you can see what I'm talking about:
    As you can see the correct options are selected.
    As you can also see the help has downloaded and is "Current".
    As you can see when I search for something as simple as "brush" the "Adobe Community Help Application" returns nothing, lol.
    Cheers.

  • User-defined variables in Search Results pane

    I am working with user-defined variables for WebHelp output.
    I have successfully added the variables to the topic, the displayed
    topic title, the TOC, and the Index entries. The problems lies in
    getting the search output to display the specified variable text.
    For example, the base topic title is "Introduction to XX". I
    use a variable to change the XX to YY throughout the project;
    however, when I generate the output and then Search for YY, the
    search results pane displays "Introduction to XX" even though the
    displayed topic is titled, correctly, "Introduction to YY". I am
    assuming, because the topic title is not adhering to the variables,
    that the search results displays the metadata <title>.
    What should I do so the search results title syncs with the
    other data?
    Carol

    Welcome to the forum.
    There have been two posts about this recently so do a search
    for more information.
    Basically the search results show the Topic Title as defined
    in Topic Properties. Your variable is in the Topic Heading at the
    top of the page. Not the same thing.
    I suggest you request a feature change.
    http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

  • Create PDF from Search results...

    Hello all.
    I am currently creating PDF's of all my company websites. We are going to uses these PDFs as sources of information.
    Basically, We are going to use Acrobats search functionality to search across a large number of PDFs of the websites. Lets say I search for "Cancer"
    The search results come back with the PDF document title link and link to the exact page were the words Cancer is found.
    What I would like to do it to be able to create one PDF based on all the pages located in the search results.
    Is it possible to automate this process without having to physically open every page and extract it?
    Cheers
    John

    Hi,
    You can use Adobe Services to create PDF using Webdynpro.
    You can display your search results from SAP R/3 in a PDF file.
    Check out this link
    http://help.sap.com/saphelp_nw04/helpdata/en/1a/ff773f12f14a18e10000000a114084/frameset.htm
    Thanks
    Senthil
    P.S. If you find the answer useful, allocate points.

  • TREX Search Result Layout: Can you change it?

    Hi,
    Is it possible to have different flavors for the TREX Search Result Layout?
    Ideally would be through the use of parameters in the typical TREX URL.  I know that "Navigation.xml" file is hard-coded.....
    Thanks.
    Dick

    Hi Thilo,
    Thanks.
    But I want to use my new LayoutSet using the URL-based interface to TREX:
    https://xxxx.xxxx.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.service?startpage=searchpage&configfilename=navigation.xml&resourcelisttype=com.sapportals.wcm.searchresultlist&searchtype=ctrlpers&selectedsearchin=from_here&selectedsearchfromhere=/room_extensions/cm_stores/pm_storage/workspaces/d4919b6d-ff00-0010-439b-9a59dec17c56&querystring=dog&searchvisible=false&showoptions=false&allowedsortprops=false&selectedsearchaction=fuzzy&selectedmatchesperpage=5&enablesearchsorting=false.
    Dick

  • IProcurement  Search Results Per Page

    Hi to All,
    Was looking for a profile option that controls the search results per page. We know there is the iProcurement section that a user can set the search results per page. But we are looking for a global profile option.
    In researching this option within ML found the following profile: POR: Result Set Size. But this profile doesnt change the results per page.
    Does anyone have thoughts on what the correct profile is or why the POR: Result Set Size is not working as expected.
    Thanks

    Hi,
    Thanks for your response. In Robohelp 8 there are no options for hiding the search results per page feature while generating the output. Can you please guide me. I tried removing the content from the output by commenting out the followig code from the whform.htm file. However, the text box showing 10 remains. I cannot remove that. Can you suggest?
    gsMaxSearchTitle = "Search results per page" ; 
    gsMaxSearchTitle = "Search results per page";
    if (window.gbWhForm)
    RegisterListener2(this, WH_MSG_SHOWTOC);
    RegisterListener2(this, WH_MSG_SHOWIDX);
    RegisterListener2(this, WH_MSG_SHOWFTS);
    RegisterListener2(this, WH_MSG_SHOWGLO);
    RegisterListener2(this, WH_MSG_SEARCHTHIS);
    RegisterListener2(this, WH_MSG_BACKUPSEARCH);
    RegisterListener2(this, WH_MSG_HILITESEARCH);
    RegisterListener2(this, WH_MSG_GETSEARCHSTR);
    RegisterListener2(this, WH_MSG_SETSYNSTR);
    RegisterListener2(this, WH_MSG_GETMAXRSLT);
    RegisterListener2(this, WH_MSG_SETNUMRSLT);
    RegisterListener2(this, WH_MSG_GETNUMRSLT);
    gfunLookUp = ftsLookup;
    gfunInit = null;
    gstrFormName = "FtsInputForm"
    gsTitle = "Type in the word(s) to search for:";
    gsTitle = "Type in the word(s) to search for:";
    gsHiliteSearchTitle = "Highlight search results";
    gsHiliteSearchTitle = "Highlight search results";
    gsMaxSearchTitle = "Search results per page" ;
    gsMaxSearchTitle = "Search results per page";
    setGoImage1("wht_go.gif");
    setBackgroundcolor("White");

Maybe you are looking for