Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6125067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:12:18+00:00 2026-05-23T16:12:18+00:00

My database has three columns, which I configured lucene to index. However, I can

  • 0

My database has three columns, which I configured lucene to index. However, I can search by only one of them. Complete description is the following:

I am following these instructions to configure solr to use mysql data:

http://digitalpbk.com/apachesolr/apache-solr-mysql-sample-data-config

I downloaded the jdbc driver, put it in /example/lib, and created a new requestHandler in /example/conf/solrconfig.xml.

My database table items has three columns:

  1. id: int, primary, autoincrement key

  2. name: varchar(256)

  3. description: varchar(511)

So, I create following data-config.xml:

<dataConfig>
    <dataSource type="JdbcDataSource"
                    driver="com.mysql.jdbc.Driver"
                    url="jdbc:mysql://SERVER/DATABASE"
                    user="USERNAME" 
                    password="PASSWORD"/>
        <document name="content">
            <entity name="node" query="select id, name, description from items">
                <field column="id"         name="id" />
                <field column="name"       name="name" />
                <field column="description" name="description" />
            </entity>
        </document>
</dataConfig>

Next, I edit schema.xml in /example/solr/conf to let it know about new names:

<field name="id"          type="string" indexed="true" stored="true"> 
<field name="name"        type="string" indexed="true" stored="true"> 
<field name="description" type="string" indexed="true" stored="true"> 

I had to uncomment the descriptions of id and name which were present in this file earlier, since they clashed with my descriptions.

Next, I imported the database (around 100K rows) successfully.

At the end of all this, I can successfully search by name, but I am unable to search by description or by id. I do not understand why this should be the case. Any help or pointers would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T16:12:19+00:00Added an answer on May 23, 2026 at 4:12 pm

    Name field may be the default field name to search. So make sure you are referring the field names in your query.

    To search in description field use query: description:queryString
    To search in all fields use query: id:queryString OR name:queryString OR description:queryString

    For more information please check http://wiki.apache.org/solr/SolrRelevancyFAQ

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

One of the tables in my database has three columns. They are dt_id (PK),
My database has got four columns: one , two , three and four each
I have a form created which an unbound datagridview that has three columns. Position,
I have three tables: computers, which has columns for id, serial number, make, model,
I currently have a system in which one rails 2.3.2 has a database with
I am loading three dataset from the database which has Dataset 1 > Table
I have a table in my data base that has three columns: Screen, Icon,
My database has 7 tables: one is the parent (feeds) and the other 3
Model: I have a model in which one Installation can contain multiple Computer Systems.
I have a MySQL database which has 10 tables in it. The database structure

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.