| | |
| | | IndexWriter writer = getIndexWriter(repositoryName);
|
| | | for (PathChangeModel path : changedPaths) {
|
| | | // delete the indexed blob
|
| | | deleteBlob(repositoryName, branch, path.path);
|
| | | deleteBlob(repositoryName, branch, path.name);
|
| | |
|
| | | // re-index the blob
|
| | | if (!ChangeType.DELETE.equals(path.changeType)) {
|
| | |
| | | Highlighter highlighter = new Highlighter(formatter, scorer);
|
| | | highlighter.setTextFragmenter(fragmenter);
|
| | |
|
| | | String [] fragments = highlighter.getBestFragments(analyzer, "content", content, 5);
|
| | | String [] fragments = highlighter.getBestFragments(analyzer, "content", content, 3);
|
| | | if (ArrayUtils.isEmpty(fragments)) {
|
| | | if (SearchObjectType.blob == result.type) {
|
| | | return "";
|