Sharepoint Forum

 
Home » Forum » Sharepoint       Ask a questionRSS Feeds

Problem searching indexed and mapped column

  Asked By: Kayla Lewis         Date: Apr 09, 2010      Category: Sharepoint      Views: 1405
 

I'm attempting search a custom column from a document library using the search
web service (search.asmx) programmatically and I'm not really sure what the
problem is.

I have two custom columns on a doc lib, let's call them "Contains Data"
(yes/no), and "My Data" (mutli-line text). Both fields have been picked up by
the crawler. I've also created to map properties to map the doclib column
"Contains Data" to "containsData" and "My Data" to "myData".

Both mapped properties appear when using the SharePoint Search Service Tool.

On to the problem...

When executing this to weed out the results that has containsData=1:


SELECT Title, Author,Description, FileExtension, Path, keywords ,Size,Rank,
containsData, ContentType,
ContentSource,Created,CreatedBy,DocSignature,IsDocument FROM portal..scope()
Where FREETEXT(DefaultProperties, 'stuff') AND Contains(containsData,'"1"')
ORDER BY "Rank" DESC

it works just fine and I get back results.


When executing this to pull down the contents of myData:

SELECT Title, Author,Description, FileExtension, Path, keywords ,Size,Rank,
containsData, myData, ContentType,
ContentSource,Created,CreatedBy,DocSignature,IsDocument FROM portal..scope()
Where FREETEXT(DefaultProperties, 'stuff') AND Contains(containsData,'"1"')
ORDER BY "Rank" DESC

I keep getting a

"Microsoft.Office.Server.Search.Query.InvalidPropertyException"
error.

Further more, from the 12 logs....

06/06/2010 17:27:00.25 w3wp.exe (0x0DA4) 0x1074 Search
Server Common MS Search Administration 0 High Log Query:
Property doesn't exist or is used in a manner inconsistent with schema settings.
More Information: Column does not exist.
06/06/2010 17:27:00.25 w3wp.exe (0x0DA4) 0x1074 Search
Server Common MS Search Query 7hte High Exception
caught in QueryService.Query method. Exception message: Property doesn't exist
or is used in a manner inconsistent with schema settings.. Stack: at
Microsoft.Office.Server.Search.Query.FullTextSqlQuery.Execute() at
Microsoft.Office.Server.Search.Query.QueryService.DoQuery(Boolean queryMethod,
String queryXml, String& domain, String& queryId, Int32& startAt, Boolean&
fStandardResults) at
Microsoft.Office.Server.Search.Query.QueryService.Query(String queryXml).


So basically, I'm puzzled that is says that the column doesn't exist, yet I can
see that it's managed and mapped using the Search Tool. For those not familiar
with the tool, it basically calls the web service and retrieves the managed
properties listing.

To make matters a bit more interesting, there is another search tool on codeplex
called Search Coder that lets you use the same sql statement using the
SharePoint object model and by using the web service. When using this tool with
the web service, it returns the same error (expected). When using this tool
against the object model, it works!

So I guess the big question is, whats different between the OM and the search
web service and how to get around this problem (other than using the OM)?

Tagged:            

 

8 Answers Found

 
Answer #1       Answered By: Makayla Lewis          Answered On: Apr 09, 2010       

this may seem to be very outdated question. but I need answer to this
for a migration.

what exactly is a web  in SPS 2003?

When I run prescan tool  on SPS 2003. it says web scanned.

Please help me in understanding relationship between website and web

 
Answer #2       Answered By: Miranda Scott          Answered On: Apr 09, 2010       

web  (aka SPWeb in the SharePoint object  model) is a web site (root web site or
a child web site).

 
Answer #3       Answered By: Deirdre Macias          Answered On: Apr 09, 2010       

I took the following sample from one of the web  post
(http://blogs.msdn.com/b/joelo/archive/2007/04/13/don-t-be-afraid-of-prescan-par\
t-1.aspx)
. this shows the prescan result


/07/19/2006 17:17:01 Scan finished
without failure.
07/19/2006 17:17:01 Number of sites
skipped (already scanned): 0
07/19/2006 17:17:01 Number of sites
scanned: 100
07/19/2006 17:17:01 Number of broken
sites: 0
07/19/2006 17:17:01 Number of webs
scanned: 138
07/19/2006 17:17:01 Number of broken
webs: 0
07/19/2006 17:17:01 Number of webs using
custom template: 0
07/19/2006 17:17:01 Number of pages
scanned: 0
07/19/2006 17:17:01 Number of unghosted
pages: 63/

why the sites and webs are mentioned as two different things in this
result ?
Am i missing anything which is very basic ?

 
Answer #4       Answered By: Kala Solomon          Answered On: Apr 09, 2010       

That confusing terminology is still intact in SP 2010.
SPSite can be conceived as shorthand to SiteCollection, while SPWebs are the
Sites within that collection.

 
Answer #5       Answered By: Madison Clark          Answered On: Apr 09, 2010       

A site is a "Site Collection" and a web  is any site under that site
collection...

 
Answer #6       Answered By: Dhanraj Saxsena          Answered On: Apr 09, 2010       

Make sure you have created  the managed properties  and the managed  properties are
mapped to the right un-managed properties, ie, the ones starts with ows. After
you have mapped  the managed properties, you need to start a full indexing of the
data.

 
Answer #7       Answered By: Kacie Calhoun          Answered On: Apr 09, 2010       

Managed property  myData is mapped  to:

ows_myData_x0020_Data(Text), myData(Text)

I've performed a full crawl several times and rebooted. Still doesn't work.

Any other ideas?

 
Answer #8       Answered By: Duane Walton          Answered On: Apr 09, 2010       

Fixed it, reset all crawled content, full crawl. Now it works...

 
Didn't find what you were looking for? Find more on Problem searching indexed and mapped column Or get search suggestion and latest updates.


Your Answer
  • Answer should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].