Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 21st, 2011, 04:06 PM
Registered User
 
Join Date: Dec 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Apache Solr xslt

Being new to xml/xslt/solr, I am hoping someone can explain/help me with the following:

I am using Apache-Solr for searching a document. Solr returns the search result in XML, and has xslt support. I am using a php page for submitting the search, and display the result in html.

I indexed a 1.5MB size pdf document (400 pages). Using the admin interface with *:* query everything is there.

I then try using highlighting in the query, and modified the xsl file to return the highlighting.
It works fine for the text in the beginning of the document. I can query with a phrase between " " and it returns the exact match.

When searching content approx. beyond the first 100 pages, I see this behavior:
I must include common words in a phrase to get a result returned. For example if I search using the word handymen, that only appears in one place towards the end of the document, nothing is returned, but if I add a common word that appears in the sentence where handymen is; e.g. 'handymen that', then both are returned in the highlighting including many other occurrences of 'that'. If I query with "handymen that", nothing is returned.

I don't know if it is a Solr bug or if I am doing something wrong.

thanks
Ben
 
Old December 31st, 2011, 08:20 PM
Friend of Wrox
 
Join Date: Jul 2006
Posts: 430
Thanks: 28
Thanked 5 Times in 5 Posts
Send a message via Yahoo to bonekrusher
Default

Hi,

Solr returns the xml and the xslt formats it to HTML. What does your returning XML look like? What are you expecting as results? We would need to see a sample snippet of the xml and the part of the XSLT that you use to generate the highlighted results. Perhaps provide a small example would help.

Regards,
 
Old January 1st, 2012, 01:24 PM
Registered User
 
Join Date: Dec 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank's for the reply.
I also posted my question on the solr user list. I had to increase the <maxFieldLength> element in solrconfig.xml, and then it worked.
Bent





Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache 2 and Apache tomcat bfsteel Forum and Wrox.com Feedback 0 July 17th, 2009 09:06 AM
General XSLT Questions in the XSLT Forum jminatel BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0 0 March 31st, 2008 07:50 PM
Can XSLT read DTD/schema and Generate XSLT.. ROCXY XSLT 1 November 6th, 2006 09:39 AM
dynamic xslt -> xslt creation namespace problem jkmyoung XSLT 2 July 15th, 2006 12:42 AM
Apache javaApache BOOK: Professional Apache Tomcat 0 September 22nd, 2004 03:53 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.