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 Rajdeep Alapati <ra...@benefitfocus.com> on 2012/01/11 12:01:59 UTC

Not able to see the output when search is clicked

Hi,

In my SOLR, I have a query based data-config written and was able to manage below steps but i was not able to see the output



1) Register Data Import Request handler in Solr-config.xml
2) Modify Data-Config.xml for the appropriate query to get data imported from which includes making use of Jtds Driver for Sql server
3) Modify SolrConfig.xml file for registering db-data-config.xml in Request Handler item
4) Modify schema.xml for the output result. Right now we are facing issues here.please let me attach 2 files 1) schema.xml 2) db-data-config.xml.

Schema.xml

<?xml version="1.0" encoding="UTF-8" ?>
  <schema name="example" version="1.2">
  <types>
      <fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true" />
      <fieldType name="int" class="solr.TrieIntField" precisionStep="0" omitNorms="true" positionIncrementGap="0" />
      <fieldType name="date" class="solr.TrieDateField" omitNorms="true" precisionStep="0" positionIncrementGap="0" />
      <fieldType name="text" class="solr.TextField" positionIncrementGap="100">
          <analyzer type="index">
              <tokenizer class="solr.WhitespaceTokenizerFactory" />
              <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
              <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1" />
              <filter class="solr.LowerCaseFilterFactory" />
              <filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt" />
          </analyzer>
        <analyzer type="query">
          <tokenizer class="solr.WhitespaceTokenizerFactory" />
          <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true" />
          <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
          <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1" />
          <filter class="solr.LowerCaseFilterFactory" />
          <filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt" />
        </analyzer>
      </fieldType>
      </types>
  <fields>
      <field name="FileId" type="string" indexed="true" stored="true" required="true" />
	  <field name="Title" type="string" indexed="true" stored="true" required="true" />
      
  </fields>
   
   <uniqueKey>FileId</uniqueKey>
   <defaultSearchField>FileId</defaultSearchField>
   <solrQueryParser defaultOperator="AND" />
  </schema>


db-data-config.xml

<dataConfig>
    <dataSource type="JdbcDataSource" driver="net.sourceforge.jtds.jdbc.Driver" url="jdbc:jtds:sqlserver://17.30.199.667:1433;databaseName=XXXX" user="XXXX" password="XXX" />
    <document>
		<entity name="Files" query="Select FileID,Title from files">
			
			<field column="FileID" name="FileID" />
			<field column="Title" name="Title" />
		
		</entity>
            
            
        
    </document>
</dataConfig>





5) Make full import http request for data to get indexed into solr server. Even though i see that all the rows are indexed but not able to find results when search is clicked on the admin page


Thanks
Raj Deep 
Benefitfocus is the largest benefits technology provider in the U.S. 
More than 15 million consumers, 300,000 employers and 60,000 brokers 
use our cloud-based platform to shop, enroll, manage and exchange all 
their benefits in one place. From consumer engagement and education 
to enrollment, communication and billing, Benefitfocus is helping 
companies find a better way to manage their benefits. For 
more information, visit www.benefitfocus.com 
Benefitfocus ­ All Your Benefits. One Place.

CONFIDENTIALITY NOTICE: This message and any attachments are for the 
use of the intended individuals and may contain information that is 
confidential and exempt from disclosure under law. If you are not the 
intended recipient, any further use, distribution, or disclosure of this 
message or attachments is strictly prohibited. If you have received this 
communication in error, please contact the sender or bfpostmaster@benefitfocus.com 
immediately and delete this message and any attachments from your system. (01/2012)

Re: Not able to see the output when search is clicked

Posted by Erick Erickson <er...@gmail.com>.
Several questions:

1> did you commit after the full import?
2> have you tried looking at the interactive DIH console? See:
     http://wiki.apache.org/solr/DataImportHandler#interactive
3> Do your Solr logs show anything?

Best
Erick

On Wed, Jan 11, 2012 at 7:27 AM, Rajdeep Alapati
<ra...@benefitfocus.com> wrote:
> Hi Mohanty,
>
>
> I have entered *:* in the search box and the url it redirected to was
>
>
> "http://localhost:8983/solr/select/?q=*%3A*&version=2.2&start=0&rows=10&indent=on"
>
> and the output was the below content where i expected 3 rows in 3 items
>
>
> Thanks
> Raj Deep Alapati
>
>
>
>  <?xml version="1.0" encoding="UTF-8" ?>
> - <response>
> - <lst name="responseHeader">
>  <int name="status">0</int>
>  <int name="QTime">0</int>
>  </lst>
> - <lst name="initArgs">
> - <lst name="defaults">
>  <str name="config">db-data-config.xml</str>
>  </lst>
>  </lst>
>  <str name="status">idle</str>
>  <str name="importResponse" />
> - <lst name="statusMessages">
>  <str name="Total Requests made to DataSource">1</str>
>  <str name="Total Rows Fetched">3</str>
>  <str name="Total Documents Skipped">0</str>
>  <str name="Full Dump Started">2012-01-10 06:24:14</str>
>  <str name="">Indexing completed. Added/Updated: 3 documents. Deleted 0 documents.</str>
>  <str name="Committed">2012-01-10 06:24:16</str>
>  <str name="Optimized">2012-01-10 06:24:16</str>
>  <str name="Total Documents Processed">3</str>
>  <str name="Time taken">0:0:2.578</str>
>  </lst>
>  <str name="WARNING">This response format is experimental. It is likely to change in the future.</str>
>  </response>
> ________________________________________
> From: Gora Mohanty [gora@mimirtech.com]
> Sent: 11 January 2012 17:15
> To: solr-user@lucene.apache.org
> Subject: Re: Not able to see the output when search is clicked
>
> On Wed, Jan 11, 2012 at 4:31 PM, Rajdeep Alapati
> <ra...@benefitfocus.com> wrote:
> [...]
>
>> 5) Make full import http request for data to get indexed into solr server. Even though i see that all the rows are indexed but not able to find results when search is clicked on the admin page
>
> Sorry, what do you mean by "when search is clicked on the admin page"?
> What are you entering in the text input box? Please, cut and paste the
> exact URL that you are taken to after clicking.
>
> Regards,
> Gora
> Benefitfocus is the largest benefits technology provider in the U.S.
> More than 15 million consumers, 300,000 employers and 60,000 brokers
> use our cloud-based platform to shop, enroll, manage and exchange all
> their benefits in one place. From consumer engagement and education
> to enrollment, communication and billing, Benefitfocus is helping
> companies find a better way to manage their benefits. For
> more information, visit www.benefitfocus.com
> Benefitfocus ­ All Your Benefits. One Place.
>
> CONFIDENTIALITY NOTICE: This message and any attachments are for the
> use of the intended individuals and may contain information that is
> confidential and exempt from disclosure under law. If you are not the
> intended recipient, any further use, distribution, or disclosure of this
> message or attachments is strictly prohibited. If you have received this
> communication in error, please contact the sender or bfpostmaster@benefitfocus.com
> immediately and delete this message and any attachments from your system. (01/2012)
>

Re: Not able to see the output when search is clicked

Posted by Gora Mohanty <go...@mimirtech.com>.
On Wed, Jan 11, 2012 at 5:57 PM, Rajdeep Alapati
<ra...@benefitfocus.com> wrote:
> Hi Mohanty,
>
>
> I have entered *:* in the search box and the url it redirected to was
>
>
> "http://localhost:8983/solr/select/?q=*%3A*&version=2.2&start=0&rows=10&indent=on"

OK, this looks fine: I was just wondering if you had missed the *:*

> and the output was the below content where i expected 3 rows in 3 items

That output is from the import, and not from the query. It does show
that the data import completed successfully, committed, and optimised
the index.

Maybe, your fields are not set up correctly. Could you share your
schema.xml, and the DIH configuration file, data-config.xml?
Preferably, use pastebin.com for these.

Regards,
Gora

RE: Not able to see the output when search is clicked

Posted by Rajdeep Alapati <ra...@benefitfocus.com>.
Hi Mohanty,


I have entered *:* in the search box and the url it redirected to was 


"http://localhost:8983/solr/select/?q=*%3A*&version=2.2&start=0&rows=10&indent=on"

and the output was the below content where i expected 3 rows in 3 items


Thanks
Raj Deep Alapati



  <?xml version="1.0" encoding="UTF-8" ?> 
- <response>
- <lst name="responseHeader">
  <int name="status">0</int> 
  <int name="QTime">0</int> 
  </lst>
- <lst name="initArgs">
- <lst name="defaults">
  <str name="config">db-data-config.xml</str> 
  </lst>
  </lst>
  <str name="status">idle</str> 
  <str name="importResponse" /> 
- <lst name="statusMessages">
  <str name="Total Requests made to DataSource">1</str> 
  <str name="Total Rows Fetched">3</str> 
  <str name="Total Documents Skipped">0</str> 
  <str name="Full Dump Started">2012-01-10 06:24:14</str> 
  <str name="">Indexing completed. Added/Updated: 3 documents. Deleted 0 documents.</str> 
  <str name="Committed">2012-01-10 06:24:16</str> 
  <str name="Optimized">2012-01-10 06:24:16</str> 
  <str name="Total Documents Processed">3</str> 
  <str name="Time taken">0:0:2.578</str> 
  </lst>
  <str name="WARNING">This response format is experimental. It is likely to change in the future.</str> 
  </response>
________________________________________
From: Gora Mohanty [gora@mimirtech.com]
Sent: 11 January 2012 17:15
To: solr-user@lucene.apache.org
Subject: Re: Not able to see the output when search is clicked

On Wed, Jan 11, 2012 at 4:31 PM, Rajdeep Alapati
<ra...@benefitfocus.com> wrote:
[...]

> 5) Make full import http request for data to get indexed into solr server. Even though i see that all the rows are indexed but not able to find results when search is clicked on the admin page

Sorry, what do you mean by "when search is clicked on the admin page"?
What are you entering in the text input box? Please, cut and paste the
exact URL that you are taken to after clicking.

Regards,
Gora
Benefitfocus is the largest benefits technology provider in the U.S. 
More than 15 million consumers, 300,000 employers and 60,000 brokers 
use our cloud-based platform to shop, enroll, manage and exchange all 
their benefits in one place. From consumer engagement and education 
to enrollment, communication and billing, Benefitfocus is helping 
companies find a better way to manage their benefits. For 
more information, visit www.benefitfocus.com 
Benefitfocus ­ All Your Benefits. One Place.

CONFIDENTIALITY NOTICE: This message and any attachments are for the 
use of the intended individuals and may contain information that is 
confidential and exempt from disclosure under law. If you are not the 
intended recipient, any further use, distribution, or disclosure of this 
message or attachments is strictly prohibited. If you have received this 
communication in error, please contact the sender or bfpostmaster@benefitfocus.com 
immediately and delete this message and any attachments from your system. (01/2012)


Re: Not able to see the output when search is clicked

Posted by Gora Mohanty <go...@mimirtech.com>.
On Wed, Jan 11, 2012 at 4:31 PM, Rajdeep Alapati
<ra...@benefitfocus.com> wrote:
[...]

> 5) Make full import http request for data to get indexed into solr server. Even though i see that all the rows are indexed but not able to find results when search is clicked on the admin page

Sorry, what do you mean by "when search is clicked on the admin page"?
What are you entering in the text input box? Please, cut and paste the
exact URL that you are taken to after clicking.

Regards,
Gora