mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Update bleve dependency to latest master revision (#6100)
* update bleve to master b17287a86f6cac923a5d886e10618df994eeb54b6724eac2e3b8dde89cfbe3a2 * remove unused pkg from dep file * change bleve from master to recent revision
This commit is contained in:
		
				
					committed by
					
						 techknowlogick
						techknowlogick
					
				
			
			
				
	
			
			
			
						parent
						
							11e316654e
						
					
				
				
					commit
					a380cfd8e0
				
			
							
								
								
									
										14
									
								
								vendor/github.com/blevesearch/bleve/mapping/document.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								vendor/github.com/blevesearch/bleve/mapping/document.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -42,7 +42,7 @@ type DocumentMapping struct { | ||||
| 	Dynamic         bool                        `json:"dynamic"` | ||||
| 	Properties      map[string]*DocumentMapping `json:"properties,omitempty"` | ||||
| 	Fields          []*FieldMapping             `json:"fields,omitempty"` | ||||
| 	DefaultAnalyzer string                      `json:"default_analyzer"` | ||||
| 	DefaultAnalyzer string                      `json:"default_analyzer,omitempty"` | ||||
|  | ||||
| 	// StructTagKey overrides "json" when looking for field names in struct tags | ||||
| 	StructTagKey string `json:"struct_tag_key,omitempty"` | ||||
| @@ -324,13 +324,17 @@ func (dm *DocumentMapping) defaultAnalyzerName(path []string) string { | ||||
| } | ||||
|  | ||||
| func (dm *DocumentMapping) walkDocument(data interface{}, path []string, indexes []uint64, context *walkContext) { | ||||
| 	// allow default "json" tag to be overriden | ||||
| 	// allow default "json" tag to be overridden | ||||
| 	structTagKey := dm.StructTagKey | ||||
| 	if structTagKey == "" { | ||||
| 		structTagKey = "json" | ||||
| 	} | ||||
|  | ||||
| 	val := reflect.ValueOf(data) | ||||
| 	if !val.IsValid() { | ||||
| 		return | ||||
| 	} | ||||
|  | ||||
| 	typ := val.Type() | ||||
| 	switch typ.Kind() { | ||||
| 	case reflect.Map: | ||||
| @@ -420,7 +424,11 @@ func (dm *DocumentMapping) processProperty(property interface{}, path []string, | ||||
| 		if subDocMapping != nil { | ||||
| 			// index by explicit mapping | ||||
| 			for _, fieldMapping := range subDocMapping.Fields { | ||||
| 				fieldMapping.processString(propertyValueString, pathString, path, indexes, context) | ||||
| 				if fieldMapping.Type == "geopoint" { | ||||
| 					fieldMapping.processGeoPoint(property, pathString, path, indexes, context) | ||||
| 				} else { | ||||
| 					fieldMapping.processString(propertyValueString, pathString, path, indexes, context) | ||||
| 				} | ||||
| 			} | ||||
| 		} else if closestDocMapping.Dynamic { | ||||
| 			// automatic indexing behavior | ||||
|   | ||||
							
								
								
									
										2
									
								
								vendor/github.com/blevesearch/bleve/mapping/index.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								vendor/github.com/blevesearch/bleve/mapping/index.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -320,8 +320,8 @@ func (im *IndexMappingImpl) determineType(data interface{}) string { | ||||
| func (im *IndexMappingImpl) MapDocument(doc *document.Document, data interface{}) error { | ||||
| 	docType := im.determineType(data) | ||||
| 	docMapping := im.mappingForType(docType) | ||||
| 	walkContext := im.newWalkContext(doc, docMapping) | ||||
| 	if docMapping.Enabled { | ||||
| 		walkContext := im.newWalkContext(doc, docMapping) | ||||
| 		docMapping.walkDocument(data, []string{}, []uint64{}, walkContext) | ||||
|  | ||||
| 		// see if the _all field was disabled | ||||
|   | ||||
							
								
								
									
										3
									
								
								vendor/github.com/blevesearch/bleve/mapping/reflect.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								vendor/github.com/blevesearch/bleve/mapping/reflect.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -35,6 +35,9 @@ func lookupPropertyPath(data interface{}, path string) interface{} { | ||||
|  | ||||
| func lookupPropertyPathPart(data interface{}, part string) interface{} { | ||||
| 	val := reflect.ValueOf(data) | ||||
| 	if !val.IsValid() { | ||||
| 		return nil | ||||
| 	} | ||||
| 	typ := val.Type() | ||||
| 	switch typ.Kind() { | ||||
| 	case reflect.Map: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user