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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:47:22+00:00 2026-06-17T21:47:22+00:00

i’m using the CSVupdateHandler to index CSV files into Solr. my Csv files have

  • 0

i’m using the CSVupdateHandler to index CSV files into Solr. my Csv files have variable number of fields in every line ( eg 4 fields in line one 6 in line 2 and so on … ).

      line1:field1,field2,field3,field4 
      line2:field1,field2,field3,field4,field5,field6
      line3:field1,field2,field3,field4 

So is there a way to specify variable no of fieldnames ?? what i want it to do is to index 4 colums if there are four fields and index 6 if there are six. any other alternative way to achieve this is appreciated too 🙂 thanks !

UPDATE :

let me describe the situation ....

i have a file with CSV data like show above. i use the fieldnames parameter to specify the field names that Solr has to use. since every LINE in my file does not have a Set number of CSValues i cannot have a standard header set for this file without me having to pad some lines with null values. Eg. when i upload the above file with 6 header fields defined lines 1 and 3 will throw an error and if i use 4 header fields line 2 throws an error.. iwant to know if there is a way to specify the header fields such that the above condition works …or do i have to transform my file into eqal length fields with padded dummy values ??

  • 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-17T21:47:24+00:00Added an answer on June 17, 2026 at 9:47 pm

    solved this : specify custom fields with default values in schema.xml. to account for the extra two fields in some of the lines ! the schema.xml provided has plenty of examples !!

    ALTERNATE : u can also define a custom updateRequestProcessor and add fields based on conditions using java . and specify this processor as a part of the update processor chain in your request handler.

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

Sidebar

Related Questions

I have thousands of HTML files to process using Groovy/Java and I need to
link Im having trouble converting the html entites into html characters, (&# 8217;) i
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I have an MVC Razor view @{ ViewBag.Title = Index; var c = (char)146;
I'm making a simple page using Google Maps API 3. My first. One marker
I have a bunch of posts stored in text files formatted in yaml/textile (from
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example

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.