Skip to content

Commit

Permalink
changed to not require non-go components by default
Browse files Browse the repository at this point in the history
  • Loading branch information
mschoch committed Oct 21, 2014
1 parent d5c2b83 commit 855ca5a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
4 changes: 0 additions & 4 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
// either express or implied. See the License for the specific language governing permissions
// and limitations under the License.

// +build cld2 full
// +build libstemmer full
// +build icu full

package main

import (
Expand Down
12 changes: 1 addition & 11 deletions mapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,14 @@ func buildIndexMapping() (*bleve.IndexMapping, error) {
keywordFieldMapping := bleve.NewTextFieldMapping()
keywordFieldMapping.Analyzer = "keyword"

// a specific mapping to index the description fields
// detected language
descriptionLangFieldMapping := bleve.NewTextFieldMapping()
descriptionLangFieldMapping.Name = "descriptionLang"
descriptionLangFieldMapping.Analyzer = "detect_lang"
descriptionLangFieldMapping.Store = false
descriptionLangFieldMapping.IncludeTermVectors = false
descriptionLangFieldMapping.IncludeInAll = false

beerMapping := bleve.NewDocumentMapping()

// name
beerMapping.AddFieldMappingsAt("name", englishTextFieldMapping)

// description
beerMapping.AddFieldMappingsAt("description",
englishTextFieldMapping,
descriptionLangFieldMapping)
englishTextFieldMapping)

beerMapping.AddFieldMappingsAt("type", keywordFieldMapping)
beerMapping.AddFieldMappingsAt("style", keywordFieldMapping)
Expand Down

0 comments on commit 855ca5a

Please sign in to comment.