9951 explained code solutions for 126 technologies


manticoresearchHow to index CSV data


source text_src
{
  type = csvpipe
  csvpipe_command = cat /path/to/data.csv
  csvpipe_attr_string = name
  csvpipe_field = description
}

index text_idx {
  type = plain
  source = text_src
  path = /var/lib/manticore/data/test
}ctrl + c
text_src

name of the source block

type = csvpipe

let Manticore know that data will have CSV format

csvpipe_command

command to execute to get CSV data

/path/to/data.csv

path to the CSV file

csvpipe_attr_string

sample string attribute declaration (first column in CSV)

csvpipe_field

sample filed declaration (second column in CSV)

text_idx

name of the index block and our index

source = text_src

which source to use

/var/lib/manticore/data/test

path to store index files in