I am putting together a query to return pdfs by name. I followed many tutorials on the subject but I can never seem to return any pdf results. The index looks ok and is present.
Here is my code:
var searcherPdf = ExamineManager.Instance.SearchProviderCollection["PDFSearcher"];
var searchCriteriaPdf = searcherPdf.CreateSearchCriteria();
var queryPdf = searchCriteriaPdf.Field("name", Request.QueryString["q"]).Or().Field("nodeName", Request.QueryString["q"]).Compile();
var searchResultsPdf = searcherPdf.Search(queryPdf);
Are there any obvious mistakes? Can anyone point me to a good example for a config that is know to work?
<ExamineLuceneIndexSets> <!-- The internal index set used by Umbraco back-office - DO NOT REMOVE --> <IndexSetSetName="InternalIndexSet"IndexPath="~/App_Data/TEMP/ExamineIndexes/Internal/"/> <!-- The internal index set used by Umbraco back-office for indexing members - DO NOT REMOVE --> <IndexSetSetName="InternalMemberIndexSet"IndexPath="~/App_Data/TEMP/ExamineIndexes/InternalMember/"> <IndexAttributeFields> <addName="id" /> <addName="nodeName"/> <addName="updateDate" /> <addName="writerName" /> <addName="loginName" /> <addName="email" /> <addName="nodeTypeAlias" /> </IndexAttributeFields> </IndexSet> <IndexSetSetName="PDFIndexSet"IndexPath="~/App_Data/ExamineIndexes/PDFIndexSet/" /> <!-- Default Indexset for external searches, this indexes all fields on all types of nodes--> <IndexSetSetName="ExternalIndexSet"IndexPath="~/App_Data/TEMP/ExamineIndexes/External/" /></ExamineLuceneIndexSets>
I've not seen a great deal about how to use it and seen many OLD posts about people doing it with 3rd party packages so I'm just looking for confirmation before I start trying to make it work, probably by copying the code above.
Examine does have pdf indexer and searcher, although you have to add to the config to set it up if you look at above posts with configs you will see how to do it. The other option which is not out of the box is the cogmedia indexer i wrote many moons ago that was more for indexing pdf and other stuff like word / excel to name a few.
Yes I've used the cogworks package for PDF indexing in the past. It was good. :-)
This post led me to believe it was finally working in the core but I wasn't clear. I tried using it in the core many moons ago but go nowhere, hence the use of your package.
I'll give it another bash now, on your say so. ;-)
Examine pdf search
Hi All,
I am putting together a query to return pdfs by name. I followed many tutorials on the subject but I can never seem to return any pdf results. The index looks ok and is present.
Here is my code:
Are there any obvious mistakes? Can anyone point me to a good example for a config that is know to work?
Thanks
Adam
Are the fields name and nodename present in your pdf index ?
Can you post your examine config files ?
Dave
Hi Dave,
Here are the config files:
Thanks in advance,
Adam
Config seems okay.
According to this post the examine PDF index contains 2 fields that can be returned : http://our.umbraco.org/forum/developers/api-questions/35922-Problems-with-PDFIndexer-PDFSearcher
Adam,
Did you look at the index with luke or examine inspector just to see you have data in the index?
Regards
Ismail
Hello all,
Is PDF searching in the core of Umbraco 7?
I've not seen a great deal about how to use it and seen many OLD posts about people doing it with 3rd party packages so I'm just looking for confirmation before I start trying to make it work, probably by copying the code above.
Kind regards,
Matt
Examine does have pdf indexer and searcher, although you have to add to the config to set it up if you look at above posts with configs you will see how to do it. The other option which is not out of the box is the cogmedia indexer i wrote many moons ago that was more for indexing pdf and other stuff like word / excel to name a few.
Regards
Ismail
Thanks Ismail,
Yes I've used the cogworks package for PDF indexing in the past. It was good. :-)
This post led me to believe it was finally working in the core but I wasn't clear. I tried using it in the core many moons ago but go nowhere, hence the use of your package.
I'll give it another bash now, on your say so. ;-)
Kind regards,
Matt
is working on a reply...