• Resolved cham21

    (@cham21)


    Hi,

    I have a separate instance of Solr installed on a server, and on my wordpress server, I installed wpsolr and connected it to the Solr instance.

    The connection is fine, but how do I configure it to index documents in the media library? I set it to include word, excel, pdf files, but am I missing something? Do I have to point the index to a certain folder where the media library is? and if so, how do I do that?

    Thanks,
    Chris

    https://www.ads-software.com/plugins/wpsolr-search-engine/

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author WPSolr free

    (@wpsolr)

    Hi,

    You have nothing to do.
    Just re-index your data.

    Thread Starter cham21

    (@cham21)

    ok. I tried re-indexing and it gave me the following error code:

    Solr HTTP error: OK (400) {“responseHeader”:{“status”:400,”QTime”:397},”error”:{“msg”:”Exception writing document id 2151 to the index; possible analysis error.”,”code”:400}}

    Any idea what this means?
    thanks

    Plugin Author WPSolr free

    (@wpsolr)

    Activate ‘debug’ checkbox when indexing.

    It should give you an idea about document 2151.

    Also, you should have a java trace exception, with more explanations.

    Thread Starter cham21

    (@cham21)

    I activated it, but I don’t see any additional information.
    Is there a file size limit when indexing?
    I can’t find out which document has that id.

    Plugin Author WPSolr free

    (@wpsolr)

    You should have a java trace exception, with more explanations.

    (either in WPSOLR or in Solr logs)

    Thread Starter cham21

    (@cham21)

    Does it support all microsoft word formats? .doc, .docx, etc?

    Plugin Author WPSolr free

    (@wpsolr)

    yes.

    You can ban doc id 2151 in the indexing options page.

    Thread Starter cham21

    (@cham21)

    Hi,

    I now get the following error when performing a search. I’m not sure what is wrong with my settings…

    Fatal error: Uncaught exception ‘Solarium\Exception\HttpException’ with message ‘Solr HTTP error: OK (400) {“error”:{“msg”:”undefined field text”,”code”:400}} ‘ in D:\xampp\apps\ems\htdocs\wp-content\plugins\wpsolr-search-engine\vendor\solarium\solarium\library\Solarium\Core\Query\Result\Result.php:103 Stack trace: #0 D:\xampp\apps\ems\htdocs\wp-content\plugins\wpsolr-search-engine\vendor\solarium\solarium\library\Solarium\Core\Client\Client.php(754): Solarium\Core\Query\Result\Result->__construct(Object(Solarium\Client), Object(Solarium\QueryType\Select\Query\Query), Object(Solarium\Core\Client\Response)) #1 D:\xampp\apps\ems\htdocs\wp-content\plugins\wpsolr-search-engine\vendor\solarium\solarium\library\Solarium\Core\Client\Client.php(785): Solarium\Core\Client\Client->createResult(Object(Solarium\QueryType\Select\Query\Query), Object(Solarium\Core\Client\Response)) #2 D:\xampp\apps\ems\htdocs\wp-content\plugins\wpsolr-search-engine\classes\solr\wpsolr-search-solr-client.php(375): Solarium\Core\Client\Client->execute(Ob in D:\xampp\apps\ems\htdocs\wp-content\plugins\wpsolr-search-engine\vendor\solarium\solarium\library\Solarium\Core\Query\Result\Result.php on line 103

    Plugin Author WPSolr free

    (@wpsolr)

    “undefined field text”

    It means you are accessing a Solr index not loaded with WPSOLR schema.xml file.

    Thread Starter cham21

    (@cham21)

    ok…i got the error resolved by fixing the xml files.

    Now the problem is that it is not finding results for text inside documents.
    I uploaded a txt file and a word file (.docx)…both with some unique words.
    I then re-indexed it, and ensured that it indexes text files and all word document types.

    Still no results when searching.

    Any ideas?

    Plugin Author WPSolr free

    (@wpsolr)

    Your files must be attached to a post or a page.

    Thread Starter cham21

    (@cham21)

    Hi, I have tried adding pages with a text block that has a link to a document uploaded to wordpress, but the content of these documents are still not searchable.

    The docs are attached to page via links in a wysiwyg editor…but still no luck.
    Any ideas?

    Plugin Author WPSolr free

    (@wpsolr)

    The docs are attached to page via links in a wysiwyg editor.

    A link is not enough. The doc must have been attached to the page/post.

    If you just create links to your docs, you’ll need a crawler.

    Use the debug mode while indexing, and you’ll see the sql used by WPSOLR to retrieve docs to index.
    Notice the attachment section.
    Use the query to check if your own docs are attached.

    Thread Starter cham21

    (@cham21)

    Thanks…

    I ran debug and reindexed. This is the sql when re-indexing…

    SELECT ID, post_modified, post_parent, post_type FROM wp_posts AS posts WHERE post_modified > %s AND ( ( post_status=’publish’ AND ( post_type in (‘post’,’page’,’project’) ) ) OR ( ( post_status=’publish’ OR post_status=’inherit’ ) AND post_type=’attachment’ AND post_mime_type in (‘text/plain’,’text/csv’,’text/tab-separated-values’,’text/richtext’,’text/html’,’application/pdf’,’application/msword’,’application/vnd.ms-powerpoint’,’application/vnd.ms-write’,’application/vnd.ms-excel’) ) ) ORDER BY post_modified ASC LIMIT 100

    I also logged into our solr server admin page, and tried searching for text in one of the files that I know is attached to a page and it correctly found the result.
    However, on the wordpress site, searches don’t return anything.

    I also noticed that in the solr admin, when performing a query, the url looks like this..
    https://xspw11f011b.pharma.aventis.com:8983/solr/wp_core/select?q=hockey&wt=json&indent=true

    but on the wordpress site, the query looks like this:
    https://digitallaunch.sanofi.com/?q=british

    Is there something wrong with the query string after the domain name? Or is there something wrong in the sql query from the wpsolr indexing?

    thanks for your help.
    Chris

    Plugin Author WPSolr free

    (@wpsolr)

    If your search url is ?q=, then you’re not using WPSOLR,

    unless you selected

    WPSOLR option Search theme => 1. Use my current theme search templates (no keyword autocompletion, no ‘Did you mean’, no facets, no sort)

    and option

    ‘Replace WordPress default search by WPSOLR’s’ must be selected.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘wpsolr configured to media library documents’ is closed to new replies.