我添加了sunspot gem和apache solr的全文搜索。我的项目中有很多新文件。我不知道,是不是,但我提交了这些文件:
solr/configsets/sunspot/conf/_rest_managed.json
solr/configsets/sunspot/conf/admin-extra.html
solr/configsets/sunspot/conf/currency.xml
solr/configsets/sunspot/conf/elevate.xml
solr/configsets/sunspot/conf/lang/stopwords_en.txt
solr/configsets/sunspot/conf/mapping-ISOLatin1Accent.txt
solr/configsets/sunspot/conf/protwords.txt
solr/configsets/sunspot/conf/schema.xml
solr/configsets/sunspot/conf/scripts.conf
solr/configsets/sunspot/conf/solrconfig.xml
solr/configsets/sunspot/conf/spellings.txt
solr/configsets/sunspot/conf/synonyms.txt
solr/default/core.properties
solr/default/data/index/segments_1
solr/default/data/index/write.lock
solr/development/core.properties
solr/development/data/index/segments_1
solr/development/data/index/write.lock
solr/pids/development/sunspot-solr-development.pid
solr/solr.xml
solr/test/core.properties
solr/test/data/index/segments_1
solr/test/data/index/write.lock
这次提交后我得到了文件:
new file: solr/development/data/index/_1.fdt
new file: solr/development/data/index/_1.fdx
new file: solr/development/data/index/_1.fnm
new file: solr/development/data/index/_1.nvd
new file: solr/development/data/index/_1.nvm
new file: solr/development/data/index/_1.si
new file: solr/development/data/index/_1_1.liv
new file: solr/development/data/index/_1_Lucene50_0.doc
new file: solr/development/data/index/_1_Lucene50_0.pos
new file: solr/development/data/index/_1_Lucene50_0.tim
new file: solr/development/data/index/_1_Lucene50_0.tip
new file: solr/development/data/index/_2.fdt
new file: solr/development/data/index/_2.fdx
new file: solr/development/data/index/_2.fnm
new file: solr/development/data/index/_2.nvd
new file: solr/development/data/index/_2.nvm
new file: solr/development/data/index/_2.si
new file: solr/development/data/index/_2_Lucene50_0.doc
new file: solr/development/data/index/_2_Lucene50_0.pos
new file: solr/development/data/index/_2_Lucene50_0.tim
new file: solr/development/data/index/_2_Lucene50_0.tip
new file: solr/development/data/index/segments_5
new file: solr/development/data/tlog/tlog.0000000000000000000
new file: solr/development/data/tlog/tlog.0000000000000000001
new file: solr/development/data/tlog/tlog.0000000000000000002
new file: solr/development/data/tlog/tlog.0000000000000000003
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: app/controllers/posts_controller.rb
modified: app/views/posts/index.html.erb
deleted: solr/development/data/index/_2.fdt
deleted: solr/development/data/index/_2.fdx
deleted: solr/development/data/index/_2.fnm
deleted: solr/development/data/index/_2.nvd
deleted: solr/development/data/index/_2.nvm
deleted: solr/development/data/index/_2.si
deleted: solr/development/data/index/_2_Lucene50_0.doc
deleted: solr/development/data/index/_2_Lucene50_0.pos
deleted: solr/development/data/index/_2_Lucene50_0.tim
deleted: solr/development/data/index/_2_Lucene50_0.tip
deleted: solr/development/data/index/segments_1
deleted: solr/development/data/index/segments_5
Untracked files:
(use "git add <file>..." to include in what will be committed)
solr/development/data/index/_4.fdt
solr/development/data/index/_4.fdx
solr/development/data/index/_4.fnm
solr/development/data/index/_4.nvd
solr/development/data/index/_4.nvm
solr/development/data/index/_4.si
solr/development/data/index/_4_Lucene50_0.doc
solr/development/data/index/_4_Lucene50_0.pos
solr/development/data/index/_4_Lucene50_0.tim
solr/development/data/index/_4_Lucene50_0.tip
solr/development/data/index/segments_9
solr/development/data/tlog/tlog.0000000000000000004
solr/development/data/tlog/tlog.0000000000000000005
solr/development/data/tlog/tlog.0000000000000000006
solr/development/data/tlog/tlog.0000000000000000007
我需要提交哪些文件,添加.gitignore,添加到我的项目中?
答案 0 :(得分:1)
git ignore:
*/data/*
*/dataimport.properties
例如:
solr/development/data/*
solr/development/conf/dataimport.properties
dataimport.proporties包含最后一个索引时间和其他动态变量
#Thu Nov 17 16:21:03 GMT 2016
last_index_time=2016-11-17 16\:21\:03
development.last_index_time=2016-11-17 16\:21\:03
solr / development / data / - 带有缓存过滤器的完整索引核心。
的提交强>
所有其他文件都很乐意提交。
solr / development / conf / - 主要核心设置(schema.xml,solrconfig.xml等)