我是Elasticsearch的新手。我已尝试在Stack Overflow和其他网站上提供不同的解决方案,但它们对我不起作用,这就是我发布此问题的原因。
我正在尝试添加 tokenizer“:”uax_url_email“,以便我可以轻松搜索带有查询的电子邮件。
但是当我设置映射时,Elastic Search会给我这个错误:
根映射定义具有不受支持的参数(mapper_parsing_exception)
我试图删除索引并重新创建它,但它也没有帮助。
我的地图链接。
http://localhost:9200/users/user/_mapping
@Override
public void bindView(View view, Context context, Cursor cursor) {
// Find individual views that we want to modify in the list item layout
ImageView foodImageView = (ImageView) view.findViewById(R.id.food_image_view);
TextView restaurantNameTextView = (TextView) view.findViewById(R.id.restaurant_name_text_view);
TextView restaurantLocationTextView = (TextView) view.findViewById(R.id.restaurant_location_text_view);
// Find the columns of restaurant attributes that we're interested in
int foodPictureColumnIndex = cursor.getColumnIndex(RestaurantEntry.COLUMN_FOOD_PHOTO_URL);
int restaurantNameColumnIndex = cursor.getColumnIndex(RestaurantEntry.COLUMN_RESTAURANT_NAME);
int restaurantLocationColumnIndex = cursor.getColumnIndex(RestaurantEntry.COLUMN_RESTAURANT_LOCATION);
// Read the restaurant attributes from the Cursor for the current restaurant
String foodPhoto = cursor.getString(foodPictureColumnIndex);
String restaurantName = cursor.getString(restaurantNameColumnIndex);
String restaurantLocation = cursor.getString(restaurantLocationColumnIndex);
// Update the Views with the attributes for the current restaurant
Picasso.with(mContext).load(foodPhoto).into(foodImageView);
restaurantNameTextView.setText(restaurantName);
restaurantLocationTextView.setText(restaurantLocation);
}