FullTextSqlQuery returning incorrect results

  • FullTextSqlQuery returning incorrect results TheCodeKing

    We are having usual behaviour with FullTextSqlQuery and wonder if anyone can help.

    The following should return 3 records which represent 3 pages on the site with titles "Sample (test1)", "Sample (test2)", and "Sample (test3)".

    SELECT Title, Rank, Size, Description, Write, Path
    FROM portal..scope()
    WHERE ( ("SCOPE" = 'myScope') )  AND CONTAINS ('"sample"')
    ORDER BY "Rank" DESC

    For some reason this only yeilds 1 result, say "Sample (test3)".

    If we change this to use a query as follows, then this also returns a single result. However this time the result is a different record, say "Sample (test3)", which proves more than 1 entry was indexed by the crawl.

    SELECT Title, Rank, Size, Description, Write, Path
    FROM portal..scope()
    WHERE ( ("SCOPE" = 'myScope') )  AND FREETEXT(defaultproperties, '"sample"')
    ORDER BY "Rank" DESC

    Why are these queries not returning all 3 results? We have tried setting TrimDuplicates to false but it makes no difference.

  • have you tried expanding the scope to 'All Sites'?

2007 search fulltextsqlquery
Related questions and answers
  • I have created a recursive query that contains 2 multi user fields. After much thrashing, where I would add the and had my query return no results, I found that the FieldRef needed to include Nullable="TRUE" and Type="UserMulti". This works, in the query now returns the correct number of records, however the value in my 2 multi user fields is empty. <View> <Webs Scope="Recursive..." Nullable="TRUE" Type="UserMulti" /> <!-- // Field which do not return values --> <ProjectProperty Name="Title" /> </ViewFields> </View> <Query>

  • I'm writing a FullTextSqlQuery and would like to return all available columns in the result set. When I specify the columns, e.g. SELECT Title FROM scope() WHERE ("scope" = 'All Sites'), the query works fine. When I try to select all columns, e.g. SELECT * FROM scope() WHERE ("scope" = 'All Sites'), a QueryMalformedException is raised. The code for the query execution is: var sqlQuery = new FullTextSqlQuery(SPContext.Current.Site) { ResultTypes = ResultType.RelevantResults, QueryText = searchQuery }; var collectionOfResults = sqlQuery.Execute(); Is it possible to retrieve all

  • Where is information about users associated with specific SharePoint site stored? I guess information is stored in relational database. To be more specific i want to ask if it is possible to query this database and get list of all users which have access to site mysubdomain.mydomain.com/sites/xyz where xyz is set of sites and to complicate it more, there is also abc which represents sub-sites... this loop jump to second column with URL to Visitors group and whole process with loops is repeated. At the end application store temporary grid with results from loops into spreadsheet and opens

  • I have a list with an URL-field. Nothing special, just the OOTB Hyperlink-field. I want to execute a CAML-query that selects items with a certain value in the description part of the URL-field. CAML <Query> <Where> <Contains> <FieldRef Name="URL" /> <Value Type="URL">text</Value> </Contains> </Where> </Query> Result Only items with 'text' in de url part are selected, if a item has 'text' in the description part it is not selected. How do i select items based the description of the URL?

  • Hello I really need help with this... , I am using Sharepoint 2007. I have the 'collect data from user' action in a workflow - which generates a custom form within the workflow folder. The form..." Title="{BC399A4C-0DB0-4BE7-9542-CD8001CC2902}" __markuptype="vsattributemarkup" __WebPartId="{9A02BCE0-AAE3-4A75-A736-8789BF8C9AF9}" id="TaskForm" pagesize="1" datasourceid="SPDataSource2"> <...="/dsQueryResponse/Rows/Row"/> <xsl:variable name="dvt_RowCount" select="count($Rows)" /> <xsl:variable name="RowLimit" select="1" /> <xsl:variable name="FirstRow

  • "/> <xsl:value-of select="sum($Rows/@Distance[.!=''])" /> </xsl:template> </xsl:stylesheet> The result is: "NaN", so I figure that my XSLT is wrong. Question.../@Distance[1]"/></xsl:call-template> <xsl:template name="xsum"> <xsl:param name="currnode"/> <xsl:param name="res" select="0"/> <xsl...-sibling::tal[1]"/> <xsl:with-param name="res" select="$res + translate($currnode,',','.')"/> </xsl:call-template> </xsl:when>

  • I have several search scopes set up in Search Administration, one of which is the default All Content scope which includes everything but items with a contentclass of SPSPeople. On my advanced... (which is admittedly redundant), the following appears in the results view: Your search cannot be completed because of a service error. Try your search again or contact your administrator for more information. This only happens with the All Content scope. There are other scopes which are also supersets of smaller scopes, and these can be selected together with their sub-scopes without problems

  • I have successfully created a DVWP which queries all lists in my subsites and returns the correct columns using the following selectcommand: <View> <Webs Scope="Recursive"></Webs> <View> <ViewFields> <FieldRef Name="Development_x0020_Status" /> <FieldRef Name="Title" /> <FieldRef Name="FileDirRef" />...;FieldRef Name="StreamName" Ascending="TRUE" /> <FieldRef Name="Title" Ascending="TRUE" /> </OrderBy> </Query> </View> One of the things i would now

  • Symptoms: You develop a browser-compatible InfoPath form with managed code for business logic. You use ContactSelector ActiveX control to look up and resolve users from the SharePoint site Users...;1;0;2;1;633988049367884000;;+age6upPf7USGkrCI/yi9kTSjvA6i5NVYPoOO9r4ST0zr2dYVKtUP1eB1ZbMDExztOK7lNa+8W8IF3Jt+yuSyQ==|633988049367728266 18;V1_I1_CP2;;T%252F%252F0%252F%252F%253B_sdja_%252F%252F0%252F...;V1_I1_CP2;;T_sdja_%252F%252F0%252F%252F [4,["\n \n sdja",["\n \n sdja","","",-1],[true,[["sdja","",0,"",0,[["John Doe","CONTOSO\\sdja",1,"John Doe",""]]]],true],false,false,false],-1,false,false

Data information