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 8979437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:50:51+00:00 2026-06-15T19:50:51+00:00

Using roo I have generated following spring bean <bean class=org.apache.solr.client.solrj.impl.CommonsHttpSolrServer id=solrServer> <constructor-arg value=${solr.serverUrl}/> </bean>

  • 0

Using roo I have generated following spring bean

<bean class="org.apache.solr.client.solrj.impl.CommonsHttpSolrServer" id="solrServer">
    <constructor-arg value="${solr.serverUrl}"/>
</bean>

Config file has

solr.serverUrl=http\://localhost\:8983/solr

which is used as follows:

@Autowired
transient SolrServer Address.solrServer;

@Async
public static void Address.indexAddresses(Collection<Address> addresses) {
    List<SolrInputDocument> documents = new ArrayList<SolrInputDocument>();
    for (Address address : addresses) {
        SolrInputDocument sid = new SolrInputDocument();
        sid.addField("id", "address_" + address.getId());
        sid.addField("address.id_i", address.getId());
        // Add summary field to allow searching documents for objects of this type
        sid.addField("address_solrsummary_t", new StringBuilder().append(address.getId()));
        documents.add(sid);
    }
    try {
        SolrServer solrServer = solrServer();
        solrServer.add(documents);
        solrServer.commit();
    } catch (Exception e) {
        e.printStackTrace();
    }
}

My question is:

Do I have to create schema in solr in order to index it in solr or this code is good enough?

Apart from this my application is a multi tier architecture and website is a small part in it. So how could I delete the data which is deleted by lets say windows application or android application.

One solution could be recreate the index but wouldn’t it result in lose of stats in solr which is used to make the search result more effective(which I am not sure of)?

How could I add synonym search in solr and how could I initialize spelling mistake add-on (words could be name of a person or place basically not from dictionary)?

Sorry for merging multiple questions. Thanks in advance for your help.

  • 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-06-15T19:50:53+00:00Added an answer on June 15, 2026 at 7:50 pm

    Do I have to create schema in solr in order to index it in solr or
    this code is good enough?

    Yes you should have schema.xml file and you should define the fields there to index.

    Apart from this my application is a multi tier architecture and
    website is a small part in it. So how could I delete the data which is
    deleted by lets say windows application or android application.

    You can delete the document using the following code snippet. Assuming the there is a field id which has a value 12345. You can write your query between the <query> tags.

    http://localhost:8983/solr/update?stream.body=<delete><query>id:12345</query></delete>&commit=true
    

    One solution could be recreate the index but wouldn’t it result in
    lose of stats in solr which is used to make the search result more
    effective(which I am not sure of)?

    AFAIK, search stats are not saved by default, so re-creating index could be a solution.

    How could I add synonym search in solr and how could I initialize
    spelling mistake add-on (words could be name of a person or place
    basically not from dictionary)?

    You can add SynonymFilterFactory to the field definition in the schema.xml file.

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

Sidebar

Related Questions

I have generated some pages using Spring Roo, and I need to show some
I'm using Spring Roo and want to access a bean within of Controller class
I have generated a spring project using Roo, and used the security setup addon
I'm using Spring Roo which generated set of hibernate and FlexJSON classes. I have
I have Roo-generated Spring MVC application connected to PostgreSQL using Hibernate. I am trying
I have to store long strings in MySQL database using spring roo. I assumed
I have generated a sample roo project using command prompt and then imported it
I'm using Spring Roo, and Spring MVC. I have Set up Spring Security to
I have created a project using Spring Roo. I have a User entity (MODEL),
I am using a dojo widget that in roo generated .jspx files. Where following

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.