You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by pyramesh <py...@gmail.com> on 2013/10/28 11:40:41 UTC

Apache-Solr with Tomcat: displaying the format of search result

Hi All,

Recently I have integrated Apache solr with Tomcat server.everything is
working fine. I am displaying the search result using velocity template.

But Here is my problem. search results are displaying the correct format as
input data format.

For Example: input data (whole data contains in single field):: 

*issue*: description about issue.
*Solution*: Solution given user goes here.

but after index the data , the data displaying in the below format

in the search result :: *issue*: description about issue.*Solution*:
Solution given user goes here.

But this is not I want.. I want to display data as same as input format.

can anyone please help on this


Thanks in Advance ...........



--
View this message in context: http://lucene.472066.n3.nabble.com/Apache-Solr-with-Tomcat-displaying-the-format-of-search-result-tp4098040.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Apache-Solr with Tomcat: displaying the format of search result

Posted by pyramesh <py...@gmail.com>.
Thanks  Shawn for quick response.......

As suggested, I verified my configuration  to check whether the update
processors configured or not and found no processors configured. I am just
wonder how the format getting changed.

Let explain my problem in details

I am indexing the .xml file to solr. and below is field configuration.

* schema.xml* (giving for a field)
=================================

*1. Filed::* 

<field name="Resolution" type="text_general" indexed="true"
multiValued="true" stored="true"/>

*2. Field Type & tokenizers*

<fieldType name="text_general" class="solr.TextField"
positionIncrementGap="100" autoGeneratePhraseQueries="true">
      <analyzer type="index">
        <tokenizer class="solr.StandardTokenizerFactory"/>
        <filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" enablePositionIncrements="true" />
		
        <filter class="solr.LowerCaseFilterFactory"/>
		<filter class="solr.EdgeNGramFilterFactory" minGramSize="1" 
maxGramSize="25" side="front"/>
      </analyzer>
      <analyzer type="query">
        <tokenizer class="solr.StandardTokenizerFactory"/>
        <filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" enablePositionIncrements="true" />
        
		<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="false" />
		<filter class="solr.PositionFilterFactory" />
        <filter class="solr.LowerCaseFilterFactory"/>
		<filter class="solr.WordDelimiterFilterFactory" catenateAll="1"/>
      </analyzer>
    </fieldType>



3. *before doing the index, data is in below format*

<field name="Resolution">*Issue:* ID country user XXXXXXXXX; unable xxx
wsdfsdfs sdsdfs

*Impact / Suspected Impact*: asa asdasdaav asdffcasdfassd

*Rootcause:* asdfas asdfasdwersdvsdv sdfsdfcss 

(1). test 12, (2).tesst 123</field>

4. *After index the  data* the data is displaying in the below format 

*Issue:* ID country user XXXXXXXXX; unable xxx wsdfsdfs sdsdfs*Impact /
Suspected Impact*: asa asdasdaav asdffcasdfassd *Rootcause:* asdfas
asdfasdwersdvsdv sdfsdfcss (1). test 12, (2).tesst 123


Could you please guide me to display the search result as same as input
format even after index..
if any update processors need to add.... what processors have to add...... 
Thanks in Advance 



--
View this message in context: http://lucene.472066.n3.nabble.com/Apache-Solr-with-Tomcat-displaying-the-input-format-in-the-search-results-tp4098040p4098183.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Apache-Solr with Tomcat: displaying the format of search result

Posted by Shawn Heisey <so...@elyograg.org>.
On 10/28/2013 4:40 AM, pyramesh wrote:
> But this is not I want.. I want to display data as same as input format.
> 
> can anyone please help on this

What Solr outputs in its fields for search results is identical to what
it receives when data is indexed, unless you have update processors
configured that change the data.  The analysis chain that you define in
schema.xml is *NOT* applied to stored data, only indexed data.

If the search results are not coming out in the format that you want, it
is either arriving at Solr incorrectly, or you have one or more update
processors that are changing it.

Thanks,
Shawn


Re: Apache-Solr with Tomcat: displaying the format of search result

Posted by pyramesh <py...@gmail.com>.
Hi Erick,

I guess you misunderstood . Let me explain my problem in details.

Field Name :* PROBLEM*

*Content of PROBLEM* 
================================================
Title: Title of issue

Description: Description of issue

Other Detail :OtherDetails fo the issue
================================================

The whole above content is for one field (PROBLEM)


When I index and display the that field.... The format getting change and
format is below (displaying Continuously).


Title: Title of issue  Description: Description of issue Other Detail
:OtherDetails fo the issue.


I want to display the same format of input data.


Thanks
Ramesh py




--
View this message in context: http://lucene.472066.n3.nabble.com/Apache-Solr-with-Tomcat-displaying-the-input-format-in-the-search-results-tp4098040p4098364.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Apache-Solr with Tomcat: displaying the format of search result

Posted by Erick Erickson <er...@gmail.com>.
This looks to me like strictly a Velocity display issue.
Try just submitting the URL in the browser (NOT to the
/browse handler, I'd use the /select handler OR comment
out the bits int he browse handler that talk about the
velocity response writer).

I'd bet that you need to go into the velocity templates and
cause the fields to be displayed as you want. You had to
go into those templates and explicitly cause the fields
you're talking about to be displayed in the first place, I
suspect you're not inserting line breaks between them.

Best,
Erick


On Tue, Oct 29, 2013 at 2:27 AM, Mamta Alshi <ma...@gmail.com> wrote:

> HI Ramesh,
>
> Have you documented how you have integrated Solr with Tomcat..?
>
> I have to do the same..was trying sometime ago and then left it...will be
> helpful if you have steps on how to integrate the two.
>
> Thanks,
> Mamta
>
>
> On Mon, Oct 28, 2013 at 2:40 PM, pyramesh <py...@gmail.com> wrote:
>
> > Hi All,
> >
> > Recently I have integrated Apache solr with Tomcat server.everything is
> > working fine. I am displaying the search result using velocity template.
> >
> > But Here is my problem. search results are displaying the correct format
> as
> > input data format.
> >
> > For Example: input data (whole data contains in single field)::
> >
> > *issue*: description about issue.
> > *Solution*: Solution given user goes here.
> >
> > but after index the data , the data displaying in the below format
> >
> > in the search result :: *issue*: description about issue.*Solution*:
> > Solution given user goes here.
> >
> > But this is not I want.. I want to display data as same as input format.
> >
> > can anyone please help on this
> >
> >
> > Thanks in Advance ...........
> >
> >
> >
> > --
> > View this message in context:
> >
> http://lucene.472066.n3.nabble.com/Apache-Solr-with-Tomcat-displaying-the-format-of-search-result-tp4098040.html
> > Sent from the Solr - User mailing list archive at Nabble.com.
> >
>

Re: Apache-Solr with Tomcat: displaying the format of search result

Posted by Mamta Alshi <ma...@gmail.com>.
HI Ramesh,

Have you documented how you have integrated Solr with Tomcat..?

I have to do the same..was trying sometime ago and then left it...will be
helpful if you have steps on how to integrate the two.

Thanks,
Mamta


On Mon, Oct 28, 2013 at 2:40 PM, pyramesh <py...@gmail.com> wrote:

> Hi All,
>
> Recently I have integrated Apache solr with Tomcat server.everything is
> working fine. I am displaying the search result using velocity template.
>
> But Here is my problem. search results are displaying the correct format as
> input data format.
>
> For Example: input data (whole data contains in single field)::
>
> *issue*: description about issue.
> *Solution*: Solution given user goes here.
>
> but after index the data , the data displaying in the below format
>
> in the search result :: *issue*: description about issue.*Solution*:
> Solution given user goes here.
>
> But this is not I want.. I want to display data as same as input format.
>
> can anyone please help on this
>
>
> Thanks in Advance ...........
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Apache-Solr-with-Tomcat-displaying-the-format-of-search-result-tp4098040.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>