KeywordQuery is matching the whole word

           
hi
i am using Microsoft.SharePoint.Client.Search. The search works fine except the thing that is matching the whole word.
For example if i search for the word gips i get hits back,  but if i search only gip i don't get any results back. Is there a way to avoid this behavior?
KeywordQuery kq = new KeywordQuery(kq.QueryText = text + " AND path:\"" + path + "\"";
kq.TrimDuplicates = false;
SearchExecutor searchExecutor = new SearchExecutor(context);
ClientResult<ResultTableCollection> results = searchExecutor.ExecuteQuery(kq);
context.ExecuteQuery();

Try appending the wildcard character "*" (without the quotes) to the query.
Start here:  http://benprins.wordpress.com/2013/03/13/sharepoint-2013-search-tips-and-tricks/
I trust that answers your question...
Thanks
C
|
RSS |
http://crayveon.com/blog |
SharePoint Scripts | Twitter |
Google+ | LinkedIn |
Facebook | Quix Utilities for SharePoint

Similar Messages

  • How to match the nth word in a string?

    Hi, when I have a string like
    "AA BBBB CCC DDDDDD EEE FF"
    all words are of the form \w+
    and I'd like to match the nth word, for example the third would be "CCC",
    how can I establish this with just one regular expression?
    Some annotations:
    This is done with Java 1.4, but tools like the string tokenizer are not
    possible (restrictions of the application) We're limited to one regular expression!
    In Perl, one would do it this way:
    This would be the regular expression:
    "[\w+\s+\w+\s+](w+)"
    and with the help of $1, you might match the first paranthesis.
    As I said before, this is no solution here, because we're limited to one
    regular expression
    Another idea for Java Regex would be to define a positive lookahead, like (?<=\w+\s+\w+\s+), but as the width of it is variable, it is not allowed!
    Thanks for your help,
    Heiko Kubidsky

    well, i did another test class
    import java.util.regex.*;
    public class NthMatch {
    public static void main(String[] args) {
      Pattern p = Pattern.compile(
        "(?:\\w+\\s+){" + args[1] + "}(\\w+)(?:\\s.*)?");
      Matcher m = p.matcher(args[0]);
      if (m.matches())
       System.out.println(m.group(1));
      else
       System.out.println("no match");
    }run: java NthMatch "aa bb cc dd" 2
    does that help?
    what kind of framework you have to squeese the regex in?
    what do you want to do with that regex?
    do you want to check if Nth word maches something, or do you want to retriev that Nth string? or are you trying to do anything else?
    your explanation is unfortunatelly not sufficient :(

  • How to type part of a word and have Numbers suggest the whole word as previously used?

    I track a budget in a table, using a limited set of category names in a column.  After typing in a few items and category names, later items use the same category names.  In Numbers 2.0, I could type the first characters of a category name and Numbers would suggest/guess the whole category name as used in earlier entries. That allowed me to choose it quickly without retyping the whole word. How to do this in Numbers 3.0?

    choose it quickly without retyping the whole word. How to do this in Numbers 3.0?
    Here's how you can do something like this in Numbers 3.0.  In many (probably most) situations it's better than "auto complete".
    Numbers 3 has an enhanced Pop-Up Menu functionality that helps prevent typos or capitalization inconsistencies from creeping in and messing up your data. It is also much more efficient than auto-complete in Numbers for iOS, should you ever want to sync to an iPad or iPhone and do data entry there.
    Pop-Up Menu is much enhanced over what it was in Numbers 2.3, and is easy to set up:
    Select the whole column or range before formatting as Pop-Up Menu and your existing values in that column or range will pre-populate a menu automatically:
    Then you can remove the values you don't want in the list, such as the column header (and possibly some previous spelling errors too!):
    And after this easy one-time setup all you have to do thereafter is to choose from the pop-up list when you add rows:
    See this post for more details on how this handy feature has been enhanced in Numbers 3.0.
    Should you ever want to take your Numbers with you and do data entry on an iPad or iPhone, in a touch interface, pop-ups are much more efficient than typing the first few letters of items. You can scroll with ease through a list of dozens of items to make a pick. Anybody using Numbers cross-platform should favor Pop-Up so they can use their documents efficiently for data input on the go, which can be a productivity booster.
    See this thread for this and other workarounds for Numbers 3.0.
    SG

  • How to copy and paste the whole word or excel form in the infopath form control

    Is there any control in infopath 2010. when the form will be open and users wants then can copy whole word or excel form on this control.
    and in word form there is also a control.

    Hi John,
    You can do as the followings:
    Create a blank form with InfoPath Designer 2010,
    Add a Rich Text Box control and Submit button in the blank form
    Publish the form to your SharePoint site
    Open the form library and create a document
    Copy the table with text from word file
    Paste the table in the Rich Text Box area, the paste option is Keep Source Formatting
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • I downloaded a persona from firefox (Alpinestars) I am trying to view the whole wording "Alpinestars" but it is currently squished. Funny thing is when I open the customize module its expands to exactly how I want it. I can't get it to stay that way. HELP

    I just want to make my header taller so I can see the whole image in the persona I downloaded from firefox personas.

    They should be nearly identical - Internet recovery has a few less features and takes far longer to start up. I think you only get Internet recovery on certain macs and even then only if the recovery partition isn't working. Once in recovery mode you should be able to repair the hard drive and permissions using disk utility.
    Once you have repaired the disk you should be able to choose an install OS X option where it downloads a fresh copy space permitting and it tries to keep files in place.
    I think N during startup gets you network boot and D on gets you the hardware test. Shift during startup should try to safe boot if there is some sort of conflict keeping it from starting normally.

  • Match the given word with dictionary

    Hi all
    I have an issue .
    I need to check the given word from the user input is a dictionary word or not.
    if it is a dictionary word then i am doing some functionality.
    how can i do that?
    thanx in advance

    Load a dictionary of words into a Map of some sort. Use the user's word as the key into the map - if the map returns null, then it can be assumed to not be a real word. You will probably want to provide some mechanism so that the user can populate the map with proper names and other stuff that's not in the dictionary.
    To obtain a (raw text) dictionary with which to populate the Map you could look at the files in the /usr/share/dict folder on most Linux systems. If you don't have one to hand you can probably obtain and download one with a bit of Googling.

  • How do I make the tags highlight the whole words again in Mavericks?

    Being a photographer/graphic designer, I used the labels function a lot with the previous iOS. Now that it's been converted to tags, the file names are no longer highlighted, there's just this tiny round dot next to it. It makes it visually difficult to me to see all the important files at first glance. I like the tags functionnality, I just wish I could choose the way it's being displayed. Can someone help?

    crcochran wrote:
    This is clearly a bug and needs to be fixed.
    Doubtful that this is a bug
    Folding your tent so quickly by abandoning Apple and going to 3rd party tools sounds like horrible advice.
    Pathfinder is an App (how is this abandoning Apple?). 
    You asked for a workaround, you now have one. 
    You can, of course, just stay with Mountain Lion until (if) Apple brings back colored labels.

  • Autosuggest - beyond the 1st word match

    I've searched for this and come to the conclusion that the answer is either so obvious that it's staring me right in the face, or else it's just something that the built-in autosuggest widget won't handle.
    I have a simple <cfinput> field that looks up a user account based on text input. The query it calls searches for a user's first name, last name, or email address based on the input. Using the AJAX debugging screen, I can see that the appropriate results are, in fact, being fetched by the query.
    The problem is, quoting from the livedocs for <cfinput>:
    "You do not have to limit the returned data to values that match the cfautosuggestvalue contents, because the client-side code displays only the values that match the user input. In fact, the called function or page does not even have to use the value of the cfautosuggestvalue
    parameter that you pass to it. You should, however, use the parameter if the returned data would otherwise be long."
    It's deciding that 'matching the user input' means 'matching the first word of the query results.' In other words, if I have two users, one named Joe Smith and one named Smith Joe, and I search for Smith, it will display Smith Joe but not Joe Smith, because it doesn't 'match.'
    Is there some way I can say that, if it matches ANY of the words in the query results, rather than just the first one, to include it in the list of autosuggestions?
    Thanks,
    Aq

    Answering my own question:
    Found the solution here:
    http://betterautosuggest.riaforge.org/

  • GREP Expresson - limit to whole word

    To do a conditional search for  Cat or Cot I know part of the expression is c(a|o)t
    To find only the whole word instead of cot and cotton or cat and catnip I could use Location: beginning of word \< and   end of word  \> but suspect there is a better way?                 \<c(a|o)t\>

    Why not just search for
    Sunday|Monday etc.?
    Or if you just wanted to search for the first 3 letters with day at the end of it you could do
    \<\w\w\w(?=.+day)
    That's a Possitive Look Ahead
    (?=.+day)
    So what you're saying to do is only find the first 3 letters at the begining of a word, then look at the rest of the word, if it has any character (.+) and day (.+day) up to the end of the word then only search for the first 3 letters that match that.
    No other words will be found unless they end in -day like "today"
    So to revise that you would do something like this
    Sun|Mon|Tue|Wed|Thu|Fri|Sat|(?=\.+day)
    Being more specific.
    But it all depends on what you're looking for.
    You can find inbetween characters like say (ok this is a lame example but you get the drift)
    Chapter 1: Dinosaurs – Paleontologists
    and say you want "chapter 1" and "dinosaurs" to be  to be a character style so it becomes a running head but you don't want to find all Chapter 1 references, or perhaps chapters are referenced in the text so you could modify the GREP to be
    Chapter \d+(?=\:)|(?<=\:\s)Dinosaurs(?=\s~=)
    Then you could apply your character style because it's finding just Chapter 1 etc. but only before a Colon and it's finding only Dinosaurs after a colon but before an en dash.

  • Why does my cursor not automatically select the entire word when I try to select text by starting/ending in the middle of a word?

    In any other browser I've used (or word processor, for that matter) when I select text using my mouse cursor, if I start and/or end in the middle of a word, it automatically selects the whole word when I'm selecting more than one word. But for some reason this is not happening in Firefox. If I try to select say 3 words, and I start in the middle of the first word and end in the middle of the last word, it will only select those parts, not all 3 words entirely.

    Firefox allows to select part of a word. You can select a word with a double click and use Shift + left click to set the end of the selection, so you need to click at the end of the last word instead of in it.

  • Why does double-click no longer select a whole word?

    I am on the beta update channel and currently using FF 8.0, latest update as of the moment of this posting.
    I am not sure when it happened - I think since I started using 8.0 - but double-click no longer selects a whole word. It's the same effect as a single click - simply positions the insertion point where the mouse cursor is located.
    This is very aggravating. I thought it may be a bug in the new version (I already posted it to Bugzilla, but hasn't been confirmed yet), Unfortunately, I don't have the old version to cross-check (can I install both versions on one machine?)
    Or is it some configuration issue? Or conflict with something else? I've searched and not (yet) found any other complaints about this issue from other users.
    Note that I do not have the problem in any other app nor in other browsers that I have installed (e.g., IE, Chrome, Opera, Safari). In all of those, double-click on a word selects the whole word.
    Thanks in advance for any suggestions or guidance.
    Best,
    Yosh

    OK - I found the culprit. It seems that the Answers.com '''1-Click Answers''' utility had changed its behavior. In its Options on the Activation tab is an option to activate it when using double-click in a browser. I don't remember turning it on, but it ''was'' on. When I turned that option off, the problem went away. Apparently it is not compatible with FF8, since double-click was apparently intercepted, but 1-Click Answers was not activated - the double-click simply became a no-op.
    Now that I've turned off that option, double-click in FF8 is back to the way it's supposed to work for quickly selecting a whole word or sentence.
    If anyone else encounters this problem, I hope this information will help to resolve it.

  • Query only works on the first word of the managed property

    I have several managed properties that are not returning query results as expected, they are returning results only if the term queried matches
    the first word in the property, any other query returns no results.
    Scenario:
    filename = "Sample Excel File.xlsx" (OOTB property)
    FooOwner = "Martin Zima"
    FooSiteName = "Test Site"
    If I query filename:Sample, filename:File, filename:Excel (or any combination) they all works as expected. However, if I query "FooOwner:Martin"
    it works, but if I query FooOwner:Martin Zima it fails, and FooOwner:Zima also fails. Similarly, if I search for FooSiteName:Site it fails (only CPSiteName:Test works). Everything seems ok in the crawled property and managed property. Can anyone please help?

    Hi Martin,
    I tried in my envrionment, author:"Rebecca Tu" and
    author:Rebecca Tu returned the same result. Please try author:* and see if it will return all the results. If there is no result, then we should check the DisplayAuthor property in Search schema.
    In the default search result page, there should be Author refiner in the Refinement. You could use the default one as below:
    Regards,
    Rebecca Tu
    TechNet Community Support

  • In SQL Worksheet, when I double click to select whole word with underscore

    Hi All
    I'm using SQL Developer 2.1 in XP. After I changed various preferences, I fid when I double click a variable such as ls_test_column, it considered it as 3 words instead of one. I know in TOAD there's a setup to consider word with underscore as one word so that when double click, the whole word can be selected. Now I have to use mouse or shift key to select variables with underscore. it's inconvenient.
    Does anyone know which preference control this? Thanks.

    It is based on the "Use Change of Case as Word Boundry" preference in the Code Editor section - if this is on, then an _ is considered a "change of case" for double click selection, amongst other things.
    theFurryOne

  • Replace Function: Replacing Whole Words Only

    I'm enhancing the verity search on a project I'm working on,
    removing the operator words (as well as others) from search
    criteria before passing it to the verity engine. The only problem
    I'm having so far is stripping out the whole words "AND", "OR", and
    "NOT" from user-specified search criteria. I obviously want to do
    it only in cases where "AND", "OR", and/or "NOT" are the whole
    word, and not replace things like "hand", "organization", and
    "notingham". It's probably so simple, but I'm a bit stumped.
    While I'm here, has anyone developed anything to enhance
    verity results, or know of a resource I could look into
    further?

    you can do this with ReReplace()
    look in the documentation for "boundary", somewhere in the
    regex
    documentation, and you'll find what you're looking for. i
    think it's "\b",
    so it's something along the lines of
    ReReplace(str,"\b(and|or|not)\b","","all")
    "ckbentdesigns" <[email protected]> wrote in
    message
    news:etsdqh$igj$[email protected]..
    > I'm enhancing the verity search on a project I'm working
    on, removing the
    > operator words (as well as others) from search criteria
    before passing it
    > to
    > the verity engine. The only problem I'm having so far is
    stripping out the
    > whole words "AND", "OR", and "NOT" from user-specified
    search criteria. I
    > obviously want to do it only in cases where "AND", "OR",
    and/or "NOT" are
    > the
    > whole word, and not replace things like "hand",
    "organization", and
    > "notingham". It's probably so simple, but I'm a bit
    stumped.
    >
    > While I'm here, has anyone developed anything to enhance
    verity results,
    > or
    > know of a resource I could look into further?
    >

  • How do you turn off select whole word function?

    Massively annoying, trying to start an edit on a student paper, say, by selecting part of a word or just the period at the end of a sentence but then having to re-write the whole word, add punctuation back in, and then do your editing.  We've been doing this for a long time, now.  Computers are supposed to save people time, not create more work for them.

    You know that label at the top that says 
    Adobe Community > Acrobat > Collaboration & Commenting > Discussions
    and where I say I'm trying to select part of a word, so obviously with a select tool?
    Any other questions?

Maybe you are looking for

  • Creation of Smart Forms for PDF

    Hi All, I am new to SFP. So, please tell me how to create Smart Forms for PDF. I already have an SAP standard form of Customer Invoice in this format (SFP) and I need to change the layout and add some additional fields in it as well. Please guide me

  • How to recover deleted files on a Network Drive

    I am running the latest OS environment, and I purchased a LaCie Network drive that is attached to my airport. Two nights ago, my house took a power hit/outage. I did not suffer any hardware damage, however, I lost significant data on my network drive

  • How to embed images in long text of PM Notifications/Orders

    Dear Sir, How to embed images in long text of PM Notifications/Orders? Kindly help. Thanks & Regards PM Team.

  • Query on Creating and Populating I$ table on different condition

    Hi, I have a query on creating and populating I$ table on different condition.In which condition the I$ table is created??And These condition are mentioned below: 1)*source and staging area* are on same server(i.e target is on another server) 2)*stag

  • Txt file word count

    Hi, I have a txt file with words on it i want to count them. is there any command that allows me to do it ? Thanks