Custom query using custom columns
-
31 Temmuz 2008 Perşembe 08:02
Hi all,
I am using the Advanced search webpart to perform a custom query to SharePoint. So I've modified the properties xml adding many custom columns:
<PropertyDefs> <PropertyDef Name="Author" DataType="text" DisplayName="Author"/> <PropertyDef Name="DocumentType" DataType="text" DisplayName="Document Type"/> <PropertyDef Name="CoverageType" DataType="text" DisplayName="Coverage Type"/> <PropertyDef Name="CompanyNameReference" DataType="text" DisplayName="Company (Name Reference)"/> <PropertyDef Name="ProcedureOrFormType" DataType="text" DisplayName="Procedure or Form Type"/> </PropertyDefs> <ResultTypes> <ResultType DisplayName="All Results" Name="default"> <Query/> <PropertyRef Name="Author" /> </ResultType> <ResultType DisplayName="Documents" Name="documents"> <Query>IsDocument=1</Query> <PropertyRef Name="Author" /> <PropertyRef Name="DocumentType"/> <PropertyRef Name="CoverageType"/> <PropertyRef Name="CompanyNameReference"/> <PropertyRef Name="ProcedureOrFormType"/> </ResultType>
The properties are well defined as Metadata Properties Mappings at Shared Service. And the full crawl has detected documents with these properties setted, since I can check it in the Metadata Mapping properties.
When I try to use the Advanced Search webpart, to search for documents which "DocumentType" contains "cont" I get the following error in the SharePoint Logs:
Full Text Query: SELECT WorkId, Rank, Title, Author, Size, Path, Description, Write, SiteName, CollapsingStatus, HitHighlightedSummary, HitHighlightedProperties, ContentClass, IsDocument, PictureThumbnailURL from scope() where (DocumentType like '%Cont%') And (IsDocument=1)Monitorable <Exception><HR>0x80040e55</HR><eip>1B12AA2E</eip><module>d:\office\source\search\ytrip\tripoli\icommand\qryspec.cxx</module><line>1799</line></Exception> Monitorable In CRootQuerySpec::Execute - caught exception: 0x80040e55, translated to: 0x80040e55 - File:d:\office\source\search\ytrip\tripoli\icommand\qryspec.cxx Line:767 Log Query: Property doesn't exist or is used in a manner inconsistent with schema settings. More Information: Column does not exist. Monitorable Error while executing web part: Microsoft.SharePoint.Search.WebControls.SrhdcException: Property doesn't exist or is used in a manner inconsistent with schema settings. at Microsoft.SharePoint.Search.WebControls.SearchResultHiddenObject.get_ResultsReturned() at Microsoft.SharePoint.Search.Internal.WebControls.CoreResultsWebPart.ModifyXsltArgumentList(ArgumentClassWrapper argList) at Microsoft.SharePoint.WebPartPages.DataFormWebPart.PrepareAndPerformTransform()
Any help would be really appreciated.
TIA
Mauricio.-- Değiştirilmiş Tür Mike Walsh FIN 28 Ekim 2009 Çarşamba 10:55 question
Tüm Yanıtlar
-
31 Temmuz 2008 Perşembe 13:26Trying typing something like this into the normal search box:
ContentType:cont
Does anything come back?
John
SharePoint911: SharePoint Consulting
http://www.rossonmoss.com -
31 Temmuz 2008 Perşembe 19:37Hi John,
Thank you for your response.
I've solved the issue....
When I run the query using your suggested procedure, It's work fine and I have notice that the results shows in the page: OSSSearchResults.aspx
So, in the advanced search webpart I've configured the "result URL" property to use the SearchResults.aspx page.
Changing this property to OSSSearchResults.aspx value has solved the problem and the search works fine.
Thank you.
Mauricio.- -
28 Ekim 2009 Çarşamba 10:08Hi Marzol,
I have an issue in the advance search in my site. I created a picture library and created some custom columns like Index, Location, Date of creation etc, Now i want that user would be able to search on the base of custom column should be visible in the Add property restrictions... of Advance search page, like Index=1 or Date of creation=... etc.
I have followed an article http://www.codeproject.com/KB/sharepoint/MOSS_Advanced_Search.aspx but the result is "Property doesn't exist or is used in a manner inconsistent with schema settings."
Please help me to rectify this issue.
Thanks
Ram Sharma -
21 Haziran 2012 Perşembe 13:26
Hi,
This error is because of the sharepoint can't find that property when the results rendered.
Have you tried after reset the index and then full crawled?
Because generally what happen if we do not index reset and recrawled after creating the mapped property sharepoint cant find it value in search result.
Regards
Hiren Patel